From 062bfe7b61c5af0c189a578c78cc53cd531a534f Mon Sep 17 00:00:00 2001 From: andrewlalis Date: Thu, 27 Sep 2018 11:57:25 +0200 Subject: [PATCH] Re-did sql for database into one migration. --- backend/db.sqlite3 | Bin 212992 -> 70656 bytes backend/postings/migrations/0001_initial.py | 78 +++++++++++++++- .../migrations/0002_auto_20180916_1536.py | 23 ----- .../migrations/0003_universityreview_title.py | 19 ---- .../migrations/0004_auto_20180925_1941.py | 81 ----------------- .../migrations/0004_auto_20180926_1312.py | 86 ------------------ .../migrations/0005_auto_20180925_2032.py | 18 ---- .../migrations/0005_auto_20180927_0916.py | 18 ---- 8 files changed, 74 insertions(+), 249 deletions(-) delete mode 100644 backend/postings/migrations/0002_auto_20180916_1536.py delete mode 100644 backend/postings/migrations/0003_universityreview_title.py delete mode 100644 backend/postings/migrations/0004_auto_20180925_1941.py delete mode 100644 backend/postings/migrations/0004_auto_20180926_1312.py delete mode 100644 backend/postings/migrations/0005_auto_20180925_2032.py delete mode 100644 backend/postings/migrations/0005_auto_20180927_0916.py diff --git a/backend/db.sqlite3 b/backend/db.sqlite3 index f7ec70412271c104bf80fb3b6a26a472837ef078..2361f255e3df37658e8c6ea71bfc8cccad0c2947 100644 GIT binary patch delta 6496 zcmaht33Oc5b??6SXV*xhWi(nwni(yYWi2y*R!PQ|Myq9OF(7Yhup&!i?HVD;$TCf2 zc_HA~IP#}F+R^}NX$Xas)B$4>8lV(xw)g)(Ga5mY&N;gJ zcX{{S<=y+1{rk=P?-MGoy}Dy$HsahJou25Qb^3@v07!$=NeBtyUkm=lf4xhUzKRg3 z`sh&&lFaO9GGi_KjD5mBVDGZG*+=Y`>{a#>yU5P6r`gX=ik2GI5tLQ<8WDKv5mc;0 zP*#UvRS-c*83MZvL3S2`)HDRnVgz~<0-a8t3D{={$vXBKYP`a7u1Ynt!$imG2>UI2 znQdqHGS04Nb;vDY8ha|MH}Jwy$nCaim=6X=`zME@eFM?S*~sK<-|YNU#GGMf75b^@ z%@{j(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485#Z}@Z z4xZuM^|DYSLmnr1-B%UpcCvJX&P2t)s^v1|dbhV;@YaZe%jZsY^fIGdAfp|9=)h!n z_N#ZfYhcP<@M3vYGeq*v=hHG-CBXH#oWd9IKjA}ADJWkV)#^8JpP#aWG9s>nNq04*yxXlK%NB9rtGFbUI3hw9W|cpzw|rT^T~h=0u1OR6ExW=?$|p z;-8wDbu@>=LypEEjJ$I+5Ou)6eh2K@a5M}$v>TOjo(?Jh)50<3S6|p2lhYA+-SJ0j z96RBECq(^@p+Gd^AL)m4VQSP5w?p*_(Gea75Cn$c)vSNSU(=JE^<}%Cf-d{2L#IYd2yH}KQk_pDj;fbN(v+nNOl*q7%J)tohuGiUQ4GaMlYpSguTYHT9UKeiFARjBhdX9dJq{z!cv zG(Bvd`%DLGn+3so5L`|spO;ZhLa7a)Rpia*z4TmlBRP3`3tFR6-Z|ZYHjzzdu1BQ_ z*Z>)4A^GK*T2R$Mo_=5rdF7rQa^fxnVeggaw|s*~sN{}@Li%V?8|i<18*-~=jz66@ z|MKIdkez+1l^lF?JCZ6u$X*gIHe`?^f3Vv7aY}%Oio>W%xUnu;Ss|KV{{Z$enH&HB 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'), - ), - ]