Add migrations
Signed-off-by: Yohann D'ANELLO <ynerant@crans.org>
This commit is contained in:
parent
c585644dd6
commit
8cb3815777
|
@ -42,6 +42,3 @@ secrets.py
|
||||||
env/
|
env/
|
||||||
venv/
|
venv/
|
||||||
db.sqlite3
|
db.sqlite3
|
||||||
|
|
||||||
# Ignore migrations during first phase dev
|
|
||||||
migrations/
|
|
||||||
|
|
|
@ -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')),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
]
|
Loading…
Reference in New Issue