Add migrations

Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
Yohann D'ANELLO 2022-03-09 19:46:53 +01:00
parent c585644dd6
commit 8cb3815777
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85
3 changed files with 33 additions and 3 deletions

3
.gitignore vendored
View File

@ -42,6 +42,3 @@ secrets.py
env/ env/
venv/ venv/
db.sqlite3 db.sqlite3
# Ignore migrations during first phase dev
migrations/

View File

@ -0,0 +1,33 @@
# Generated by Django 3.2.12 on 2022-03-09 18:46
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Ticket',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('number', models.PositiveIntegerField(verbose_name='number')),
('note', models.CharField(blank=True, max_length=255, null=True, verbose_name='note')),
],
),
migrations.CreateModel(
name='Reward',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('order', models.PositiveIntegerField(verbose_name='order')),
('name', models.CharField(max_length=255, verbose_name='name')),
('image', models.ImageField(upload_to='', verbose_name='image')),
('rewarded_by', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='tbde.ticket', verbose_name='rewarded by')),
],
),
]

View File