<reponame>Visama396/Idionative<filename>idionative/migrations/0001_initial.py<gh_stars>0
# Generated by Django 2.2.1 on 2019-05-22 09:08

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField(max_length=200)),
                ('starting_date', models.DateField()),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('name', models.CharField(max_length=200)),
                ('code_2', models.CharField(max_length=2, primary_key=True, serialize=False)),
                ('code_3', models.CharField(max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('email', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=200)),
                ('password', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Word',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('word_type', models.CharField(choices=[('N', 'Noun'), ('Adj', 'Adjective'), ('Adv', 'Adverb'), ('Verb', 'Verb'), ('Pron', 'Pronoun'), ('Prep', 'Preposition')], default='N', max_length=4)),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Language')),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Unit')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.User'),
        ),
        migrations.AddField(
            model_name='course',
            name='lang',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Language'),
        ),
        migrations.CreateModel(
            name='BookmarkedWords',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.User')),
                ('word', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Word')),
            ],
        ),
    ]

# Generated by Django 2.2.1 on 2019-05-22 09:08

from django.db import migrations, models
import django.db.models.deletion


class Migration(migrations.Migration):

    initial = True

    dependencies = [
    ]

    operations = [
        migrations.CreateModel(
            name='Course',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.TextField(max_length=200)),
                ('starting_date', models.DateField()),
                ('description', models.TextField()),
            ],
        ),
        migrations.CreateModel(
            name='Language',
            fields=[
                ('name', models.CharField(max_length=200)),
                ('code_2', models.CharField(max_length=2, primary_key=True, serialize=False)),
                ('code_3', models.CharField(max_length=3)),
            ],
        ),
        migrations.CreateModel(
            name='User',
            fields=[
                ('email', models.CharField(max_length=200, primary_key=True, serialize=False)),
                ('username', models.CharField(max_length=200)),
                ('password', models.CharField(max_length=200)),
            ],
        ),
        migrations.CreateModel(
            name='Word',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('name', models.CharField(max_length=200)),
                ('word_type', models.CharField(choices=[('N', 'Noun'), ('Adj', 'Adjective'), ('Adv', 'Adverb'), ('Verb', 'Verb'), ('Pron', 'Pronoun'), ('Prep', 'Preposition')], default='N', max_length=4)),
                ('language', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Language')),
            ],
            options={
                'ordering': ('name',),
            },
        ),
        migrations.CreateModel(
            name='Unit',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('title', models.CharField(max_length=100)),
                ('description', models.TextField()),
                ('course', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Course')),
            ],
        ),
        migrations.CreateModel(
            name='Page',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('content', models.TextField()),
                ('unit', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Unit')),
            ],
        ),
        migrations.AddField(
            model_name='course',
            name='author',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.User'),
        ),
        migrations.AddField(
            model_name='course',
            name='lang',
            field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Language'),
        ),
        migrations.CreateModel(
            name='BookmarkedWords',
            fields=[
                ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
                ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.User')),
                ('word', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='idionative.Word')),
            ],
        ),
    ]
# Generated by Django 2.2.1 on 2019-05-22 09:08