diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index f7ec704..2361f25 100644 Binary files a/backend/db.sqlite3 and b/backend/db.sqlite3 differ diff --git a/backend/postings/migrations/0001_initial.py b/backend/postings/migrations/0001_initial.py index 3158aaa..f7cab3a 100644 --- a/backend/postings/migrations/0001_initial.py +++ b/backend/postings/migrations/0001_initial.py @@ -1,6 +1,7 @@ -# Generated by Django 2.0.6 on 2018-09-16 10:19 +# Generated by Django 2.1.1 on 2018-09-27 09:48 from django.db import migrations, models +import django.db.models.deletion class Migration(migrations.Migration): @@ -11,14 +12,83 @@ class Migration(migrations.Migration): ] operations = [ + migrations.CreateModel( + name='RateableEntity', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=256)), + ], + ), + migrations.CreateModel( + name='Review', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('rating', models.IntegerField(default=1)), + ('title', models.CharField(max_length=128)), + ('content', models.TextField()), + ('created_date', models.DateTimeField(auto_now_add=True)), + ('last_updated_date', models.DateTimeField(auto_now=True)), + ], + ), + migrations.CreateModel( + name='ReviewHelpfulVote', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('helpful', models.BooleanField()), + ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.Review')), + ], + ), migrations.CreateModel( name='UniversityReview', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('uni_name', models.CharField(max_length=200)), - ('user_name', models.CharField(max_length=200)), - ('date_published', models.DateTimeField(verbose_name='date published')), + ('university_name', models.CharField(max_length=200)), + ('username', models.CharField(max_length=200)), + ('rating', models.IntegerField(default=1)), + ('title', models.CharField(max_length=200)), + ('date_published', models.DateField(verbose_name='date published')), ('content', models.CharField(max_length=200)), ], ), + migrations.CreateModel( + name='Course', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.CreateModel( + name='Professor', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.CreateModel( + name='University', + fields=[ + ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), + ], + bases=('postings.rateableentity',), + ), + migrations.AddField( + model_name='review', + name='rateable_entity', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.RateableEntity'), + ), + migrations.AddField( + model_name='professor', + name='universities', + field=models.ManyToManyField(to='postings.University'), + ), + migrations.AddField( + model_name='course', + name='professors', + field=models.ManyToManyField(to='postings.Professor'), + ), + migrations.AddField( + model_name='course', + name='taught_at_university', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.University'), + ), ] diff --git a/backend/postings/migrations/0002_auto_20180916_1536.py b/backend/postings/migrations/0002_auto_20180916_1536.py deleted file mode 100644 index c107033..0000000 --- a/backend/postings/migrations/0002_auto_20180916_1536.py +++ /dev/null @@ -1,23 +0,0 @@ -# Generated by Django 2.0.6 on 2018-09-16 14:36 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0001_initial'), - ] - - operations = [ - migrations.RenameField( - model_name='universityreview', - old_name='uni_name', - new_name='university_name', - ), - migrations.RenameField( - model_name='universityreview', - old_name='user_name', - new_name='username', - ), - ] diff --git a/backend/postings/migrations/0003_universityreview_title.py b/backend/postings/migrations/0003_universityreview_title.py deleted file mode 100644 index cffb6b8..0000000 --- a/backend/postings/migrations/0003_universityreview_title.py +++ /dev/null @@ -1,19 +0,0 @@ -# Generated by Django 2.0.6 on 2018-09-16 15:37 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0002_auto_20180916_1536'), - ] - - operations = [ - migrations.AddField( - model_name='universityreview', - name='title', - field=models.CharField(default='example', max_length=200), - preserve_default=False, - ), - ] diff --git a/backend/postings/migrations/0004_auto_20180925_1941.py b/backend/postings/migrations/0004_auto_20180925_1941.py deleted file mode 100644 index a3a0581..0000000 --- a/backend/postings/migrations/0004_auto_20180925_1941.py +++ /dev/null @@ -1,81 +0,0 @@ -# Generated by Django 2.1.1 on 2018-09-25 19:41 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0003_universityreview_title'), - ] - - operations = [ - migrations.CreateModel( - name='RateableEntity', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=256)), - ], - ), - migrations.CreateModel( - name='Review', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('rating', models.IntegerField(default=1)), - ('title', models.CharField(max_length=128)), - ('content', models.TextField()), - ('created_date', models.DateTimeField(auto_now_add=True)), - ('last_updated_date', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='ReviewHelpfulVote', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('helpful', models.BooleanField()), - ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.Review')), - ], - ), - migrations.CreateModel( - name='Course', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.CreateModel( - name='Professor', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.CreateModel( - name='University', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.AddField( - model_name='review', - name='rateable_entity', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.RateableEntity'), - ), - migrations.AddField( - model_name='professor', - name='university', - field=models.ManyToManyField(to='postings.University'), - ), - migrations.AddField( - model_name='course', - name='professors', - field=models.ManyToManyField(to='postings.Professor'), - ), - migrations.AddField( - model_name='course', - name='taught_at_university', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.University'), - ), - ] diff --git a/backend/postings/migrations/0004_auto_20180926_1312.py b/backend/postings/migrations/0004_auto_20180926_1312.py deleted file mode 100644 index 77e23cf..0000000 --- a/backend/postings/migrations/0004_auto_20180926_1312.py +++ /dev/null @@ -1,86 +0,0 @@ -# Generated by Django 2.0.6 on 2018-09-26 11:12 - -from django.db import migrations, models -import django.db.models.deletion - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0003_universityreview_title'), - ] - - operations = [ - migrations.CreateModel( - name='RateableEntity', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('name', models.CharField(max_length=256)), - ], - ), - migrations.CreateModel( - name='Review', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('rating', models.IntegerField(default=1)), - ('title', models.CharField(max_length=128)), - ('content', models.TextField()), - ('created_date', models.DateTimeField(auto_now_add=True)), - ('last_updated_date', models.DateTimeField(auto_now=True)), - ], - ), - migrations.CreateModel( - name='ReviewHelpfulVote', - fields=[ - ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), - ('helpful', models.BooleanField()), - ('review', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.Review')), - ], - ), - migrations.AddField( - model_name='universityreview', - name='rating', - field=models.IntegerField(default=1), - ), - migrations.CreateModel( - name='Course', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.CreateModel( - name='Professor', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.CreateModel( - name='University', - fields=[ - ('rateableentity_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='postings.RateableEntity')), - ], - bases=('postings.rateableentity',), - ), - migrations.AddField( - model_name='review', - name='rateable_entity', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.RateableEntity'), - ), - migrations.AddField( - model_name='professor', - name='university', - field=models.ManyToManyField(to='postings.University'), - ), - migrations.AddField( - model_name='course', - name='professors', - field=models.ManyToManyField(to='postings.Professor'), - ), - migrations.AddField( - model_name='course', - name='taught_at_university', - field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='postings.University'), - ), - ] diff --git a/backend/postings/migrations/0005_auto_20180925_2032.py b/backend/postings/migrations/0005_auto_20180925_2032.py deleted file mode 100644 index 94e10b8..0000000 --- a/backend/postings/migrations/0005_auto_20180925_2032.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.1.1 on 2018-09-25 20:32 - -from django.db import migrations - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0004_auto_20180925_1941'), - ] - - operations = [ - migrations.RenameField( - model_name='professor', - old_name='university', - new_name='universities', - ), - ] diff --git a/backend/postings/migrations/0005_auto_20180927_0916.py b/backend/postings/migrations/0005_auto_20180927_0916.py deleted file mode 100644 index 55c9a4a..0000000 --- a/backend/postings/migrations/0005_auto_20180927_0916.py +++ /dev/null @@ -1,18 +0,0 @@ -# Generated by Django 2.0.6 on 2018-09-27 07:16 - -from django.db import migrations, models - - -class Migration(migrations.Migration): - - dependencies = [ - ('postings', '0004_auto_20180926_1312'), - ] - - operations = [ - migrations.AlterField( - model_name='universityreview', - name='date_published', - field=models.DateField(verbose_name='date published'), - ), - ]