@ -1,7 +1,11 @@
# Generated by Django 2.1.4 on 2019-01-04 16:17
# Generated by Django 2.1.4 on 2019-01-09 11:35
from django . conf import settings
import django . contrib . auth . models
import django . contrib . auth . validators
from django . db import migrations , models
from django . db import migrations , models
import django . db . models . deletion
import django . db . models . deletion
import django . utils . timezone
class Migration ( migrations . Migration ) :
class Migration ( migrations . Migration ) :
@ -9,20 +13,46 @@ class Migration(migrations.Migration):
initial = True
initial = True
dependencies = [
dependencies = [
( ' auth ' , ' 0009_alter_user_last_name_max_length ' ) ,
]
]
operations = [
operations = [
migrations . CreateModel (
name = ' User ' ,
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' password ' , models . CharField ( max_length = 128 , verbose_name = ' password ' ) ) ,
( ' last_login ' , models . DateTimeField ( blank = True , null = True , verbose_name = ' last login ' ) ) ,
( ' is_superuser ' , models . BooleanField ( default = False , help_text = ' Designates that this user has all permissions without explicitly assigning them. ' , verbose_name = ' superuser status ' ) ) ,
( ' username ' , models . CharField ( error_messages = { ' unique ' : ' A user with that username already exists. ' } , help_text = ' Required. 150 characters or fewer. Letters, digits and @/./+/-/_ only. ' , max_length = 150 , unique = True , validators = [ django . contrib . auth . validators . UnicodeUsernameValidator ( ) ] , verbose_name = ' username ' ) ) ,
( ' first_name ' , models . CharField ( blank = True , max_length = 30 , verbose_name = ' first name ' ) ) ,
( ' last_name ' , models . CharField ( blank = True , max_length = 150 , verbose_name = ' last name ' ) ) ,
( ' email ' , models . EmailField ( blank = True , max_length = 254 , verbose_name = ' email address ' ) ) ,
( ' is_staff ' , models . BooleanField ( default = False , help_text = ' Designates whether the user can log into this admin site. ' , verbose_name = ' staff status ' ) ) ,
( ' is_active ' , models . BooleanField ( default = True , help_text = ' Designates whether this user should be treated as active. Unselect this instead of deleting accounts. ' , verbose_name = ' active ' ) ) ,
( ' date_joined ' , models . DateTimeField ( default = django . utils . timezone . now , verbose_name = ' date joined ' ) ) ,
( ' user_age ' , models . DateField ( null = True ) ) ,
( ' groups ' , models . ManyToManyField ( blank = True , help_text = ' The groups this user belongs to. A user will get all permissions granted to each of their groups. ' , related_name = ' user_set ' , related_query_name = ' user ' , to = ' auth.Group ' , verbose_name = ' groups ' ) ) ,
] ,
options = {
' managed ' : True ,
' db_table ' : ' user ' ,
} ,
managers = [
( ' objects ' , django . contrib . auth . models . UserManager ( ) ) ,
] ,
) ,
migrations . CreateModel (
migrations . CreateModel (
name = ' Diet ' ,
name = ' Diet ' ,
fields = [
fields = [
( ' diet_id ' , models . IntegerField ( primary_key = True , serialize = False ) ) ,
( ' diet_id ' , models . Auto Field( primary_key = True , serialize = False ) ) ,
( ' diet_name ' , models . CharField ( max_length = 500 ) ) ,
( ' diet_name ' , models . CharField ( max_length = 500 ) ) ,
( ' diet_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' diet_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' diet_is_approved ' , models . BooleanField ( default = False ) ) ,
( ' diet_is_approved ' , models . BooleanField ( default = False ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' diet ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' diet ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -32,21 +62,21 @@ class Migration(migrations.Migration):
( ' diet ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
( ' diet ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' diet_prohibits_ingredient ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' diet_prohibits_ingredient ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
name = ' Drink ' ,
name = ' Drink ' ,
fields = [
fields = [
( ' drink_id ' , models . Integer Field( primary_key = True , serialize = False ) ) ,
( ' drink_id ' , models . Auto Field( primary_key = True , serialize = False ) ) ,
( ' drink_name ' , models . CharField ( max_length = 500 ) ) ,
( ' drink_name ' , models . CharField ( max_length = 500 ) ) ,
( ' drink_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' drink_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' drink_is_approved ' , models . BooleanField ( default = False ) ) ,
( ' drink_is_approved ' , models . BooleanField ( default = False ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' drink ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' drink ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -56,22 +86,22 @@ class Migration(migrations.Migration):
( ' drink ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Drink ' ) ) ,
( ' drink ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Drink ' ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' drink_has_ingredient ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' drink_has_ingredient ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
name = ' Food ' ,
name = ' Food ' ,
fields = [
fields = [
( ' food_id ' , models . Integer Field( primary_key = True , serialize = False ) ) ,
( ' food_id ' , models . Auto Field( primary_key = True , serialize = False ) ) ,
( ' food_name ' , models . CharField ( max_length = 500 ) ) ,
( ' food_name ' , models . CharField ( max_length = 500 ) ) ,
( ' food_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' food_description ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' food_calories ' , models . IntegerField ( blank = True , null = True ) ) ,
( ' food_calories ' , models . IntegerField ( blank = True , null = True ) ) ,
( ' food_is_approved ' , models . BooleanField ( default = False ) ) ,
( ' food_is_approved ' , models . BooleanField ( default = False ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' food ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' food ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -81,8 +111,8 @@ class Migration(migrations.Migration):
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Food ' ) ) ,
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Food ' ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' food_has_ingredient ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' food_has_ingredient ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -92,25 +122,25 @@ class Migration(migrations.Migration):
( ' ingredient_has_alcohol ' , models . BooleanField ( blank = True , default = False , null = True ) ) ,
( ' ingredient_has_alcohol ' , models . BooleanField ( blank = True , default = False , null = True ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' ingredient ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' ingredient ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
name = ' Permission ' ,
name = ' Permission ' ,
fields = [
fields = [
( ' permission_id ' , models . Integer Field( primary_key = True , serialize = False ) ) ,
( ' permission_id ' , models . Auto Field( primary_key = True , serialize = False ) ) ,
( ' permission_description ' , models . CharField ( max_length = 700 ) ) ,
( ' permission_description ' , models . CharField ( max_length = 700 ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' permission ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' permission ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
name = ' Restaurant ' ,
name = ' Restaurant ' ,
fields = [
fields = [
( ' restaurant_id ' , models . Integer Field( primary_key = True , serialize = False ) ) ,
( ' restaurant_id ' , models . Auto Field( primary_key = True , serialize = False ) ) ,
( ' restaurant_name ' , models . CharField ( max_length = 500 ) ) ,
( ' restaurant_name ' , models . CharField ( max_length = 500 ) ) ,
( ' restaurant_category ' , models . CharField ( max_length = 10 ) ) ,
( ' restaurant_category ' , models . CharField ( max_length = 10 ) ) ,
( ' restaurant_longitude ' , models . FloatField ( ) ) ,
( ' restaurant_longitude ' , models . FloatField ( ) ) ,
@ -118,10 +148,11 @@ class Migration(migrations.Migration):
( ' restaurant_opening ' , models . TimeField ( blank = True , null = True ) ) ,
( ' restaurant_opening ' , models . TimeField ( blank = True , null = True ) ) ,
( ' restaurant_closing ' , models . TimeField ( blank = True , null = True ) ) ,
( ' restaurant_closing ' , models . TimeField ( blank = True , null = True ) ) ,
( ' restaurant_is_approved ' , models . BooleanField ( default = False ) ) ,
( ' restaurant_is_approved ' , models . BooleanField ( default = False ) ) ,
( ' user ' , models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' restaurant ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' restaurant ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -132,8 +163,8 @@ class Migration(migrations.Migration):
( ' role_description ' , models . CharField ( max_length = 700 ) ) ,
( ' role_description ' , models . CharField ( max_length = 700 ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' role ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' role ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -144,24 +175,8 @@ class Migration(migrations.Migration):
( ' role ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Role ' ) ) ,
( ' role ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Role ' ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' role_has_permission ' ,
' managed ' : True ,
} ,
) ,
migrations . CreateModel (
name = ' User ' ,
fields = [
( ' user_id ' , models . IntegerField ( primary_key = True , serialize = False ) ) ,
( ' user_email ' , models . CharField ( max_length = 500 ) ) ,
( ' user_username ' , models . CharField ( max_length = 500 ) ) ,
( ' user_hashed_password ' , models . CharField ( max_length = 64 ) ) ,
( ' user_salt ' , models . CharField ( max_length = 32 ) ) ,
( ' user_age ' , models . DateField ( ) ) ,
( ' role ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Role ' ) ) ,
] ,
options = {
' db_table ' : ' user ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' role_has_permission ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -169,11 +184,11 @@ class Migration(migrations.Migration):
fields = [
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' diet ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
( ' diet ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' user_follows_diet ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' user_follows_diet ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -181,11 +196,11 @@ class Migration(migrations.Migration):
fields = [
fields = [
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' id ' , models . AutoField ( auto_created = True , primary_key = True , serialize = False , verbose_name = ' ID ' ) ) ,
( ' ingredient_name ' , models . ForeignKey ( db_column = ' ingredient_name ' , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Ingredient ' ) ) ,
( ' ingredient_name ' , models . ForeignKey ( db_column = ' ingredient_name ' , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Ingredient ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' user_prohibits_ingredient ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' user_prohibits_ingredient ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -197,11 +212,11 @@ class Migration(migrations.Migration):
( ' rating_text ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' rating_text ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' rating_pοrtion_size ' , models . CharField ( blank = True , max_length = 6 , null = True ) ) ,
( ' rating_pοrtion_size ' , models . CharField ( blank = True , max_length = 6 , null = True ) ) ,
( ' drink ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Drink ' ) ) ,
( ' drink ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Drink ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' user_rates_drink ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' user_rates_drink ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -213,11 +228,11 @@ class Migration(migrations.Migration):
( ' rating_text ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' rating_text ' , models . CharField ( blank = True , max_length = 700 , null = True ) ) ,
( ' rating_pοrtion_size ' , models . CharField ( blank = True , max_length = 6 , null = True ) ) ,
( ' rating_pοrtion_size ' , models . CharField ( blank = True , max_length = 6 , null = True ) ) ,
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Food ' ) ) ,
( ' food ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Food ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' user_rates_food ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' user_rates_food ' ,
} ,
} ,
) ,
) ,
migrations . CreateModel (
migrations . CreateModel (
@ -230,18 +245,13 @@ class Migration(migrations.Migration):
( ' rating_accessibility ' , models . CharField ( blank = True , max_length = 8 , null = True ) ) ,
( ' rating_accessibility ' , models . CharField ( blank = True , max_length = 8 , null = True ) ) ,
( ' diet ' , models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
( ' diet ' , models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Diet ' ) ) ,
( ' restaurant ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Restaurant ' ) ) ,
( ' restaurant ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Restaurant ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ) ,
( ' user ' , models . ForeignKey ( on_delete = django . db . models . deletion . DO_NOTHING , to = settings . AUTH_USER_MODEL ) ) ,
] ,
] ,
options = {
options = {
' db_table ' : ' user_rates_restaurant ' ,
' managed ' : True ,
' managed ' : True ,
' db_table ' : ' user_rates_restaurant ' ,
} ,
} ,
) ,
) ,
migrations . AddField (
model_name = ' restaurant ' ,
name = ' user ' ,
field = models . ForeignKey ( blank = True , null = True , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.User ' ) ,
) ,
migrations . AddField (
migrations . AddField (
model_name = ' foodhasingredient ' ,
model_name = ' foodhasingredient ' ,
name = ' ingredient_name ' ,
name = ' ingredient_name ' ,
@ -267,6 +277,16 @@ class Migration(migrations.Migration):
name = ' ingredient_name ' ,
name = ' ingredient_name ' ,
field = models . ForeignKey ( db_column = ' ingredient_name ' , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Ingredient ' ) ,
field = models . ForeignKey ( db_column = ' ingredient_name ' , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Ingredient ' ) ,
) ,
) ,
migrations . AddField (
model_name = ' user ' ,
name = ' role ' ,
field = models . ForeignKey ( default = 0 , on_delete = django . db . models . deletion . DO_NOTHING , to = ' hyrieus.Role ' ) ,
) ,
migrations . AddField (
model_name = ' user ' ,
name = ' user_permissions ' ,
field = models . ManyToManyField ( blank = True , help_text = ' Specific permissions for this user. ' , related_name = ' user_set ' , related_query_name = ' user ' , to = ' auth.Permission ' , verbose_name = ' user permissions ' ) ,
) ,
migrations . AlterUniqueTogether (
migrations . AlterUniqueTogether (
name = ' userratesrestaurant ' ,
name = ' userratesrestaurant ' ,
unique_together = { ( ' user ' , ' restaurant ' ) } ,
unique_together = { ( ' user ' , ' restaurant ' ) } ,