diff options
Diffstat (limited to 'app/classes/migrations/0001_initial.py')
-rw-r--r-- | app/classes/migrations/0001_initial.py | 57 |
1 files changed, 57 insertions, 0 deletions
diff --git a/app/classes/migrations/0001_initial.py b/app/classes/migrations/0001_initial.py new file mode 100644 index 0000000..b533aaf --- /dev/null +++ b/app/classes/migrations/0001_initial.py @@ -0,0 +1,57 @@ +# Generated by Django 3.2.8 on 2022-01-09 19:25 + +import classes.models +import datetime +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='ClassMedia', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('date_created', models.DateTimeField(default=datetime.datetime.now)), + ('file', models.FileField(blank=True, null=True, upload_to=classes.models.get_upload_path)), + ], + ), + migrations.CreateModel( + name='Session', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('date_start', models.DateField(verbose_name='Start Date')), + ('date_end', models.DateField(verbose_name='End Date')), + ('slug', models.SlugField()), + ], + options={ + 'ordering': ('-date_start',), + 'get_latest_by': 'date_start', + }, + ), + migrations.CreateModel( + name='Class', + fields=[ + ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('description', models.TextField()), + ('requires', models.TextField(verbose_name='If previous classwork is required, list prerequisites here')), + ('slug', models.SlugField()), + ('date_created', models.DateTimeField(default=datetime.datetime.now)), + ('session', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='classes.session')), + ('uploads', models.ManyToManyField(blank=True, to='classes.ClassMedia')), + ], + options={ + 'ordering': ('-date_created',), + 'get_latest_by': 'date_created', + }, + ), + ] |