class Migration(migrations.Migration): initial = True dependencies = [] operations = [ migrations.CreateModel( name='Category', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('category', models.CharField(max_length=30)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=50)), ('year', models.CharField(max_length=5)), ('author', models.CharField(max_length=50)), ('about', models.TextField()), ('cost', models.PositiveIntegerField()), ('page_number', models.PositiveIntegerField()), ('isbn_number', models.CharField(max_length=50)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.store_image)), ('file', models.FileField(blank=True, null=True, upload_to=book.models.store_file)), ('free', models.BooleanField(blank=True, default=False, null=True)), ('is_new', models.BooleanField(default=True)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('category', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Category')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0009_alter_user_last_name_max_length'), ] 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')), ('first_name', models.CharField(max_length=30)), ('last_name', models.CharField(blank=True, max_length=30)), ('age', models.PositiveIntegerField(blank=True)), ('email', models.EmailField(max_length=254, unique=True)), ('birth_date', models.DateTimeField()), ('image', models.ImageField(blank=True, upload_to='')), ('is_staff', models.BooleanField(default=False)), ('is_active', models.BooleanField(default=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')), ('user_permissions', 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')), ], options={ 'verbose_name': 'user', 'verbose_name_plural': 'users', }, managers=[ ('objects', book.models.UserManager()), ], ), migrations.CreateModel( name='Author', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=256, unique=True)), ('bio', models.TextField(blank=True)), ('date_of_birth', models.DateField()), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ], ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=256, unique=True)), ('description', models.TextField(blank=True)), ('created_at', models.DateTimeField(auto_now_add=True)), ('updated_at', models.DateTimeField(auto_now=True)), ('owner', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='books', to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='author', name='books', field=models.ManyToManyField(related_name='authors', to='book.Book'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('app', '0001_initial'), ('taggit', '0002_auto_20150616_2121'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=10)), ('name', models.CharField(max_length=100)), ('title', models.CharField(blank=True, max_length=150, null=True)), ('slug', models.SlugField(blank=True, max_length=150, null=True)), ('option', models.CharField(blank=True, max_length=150, null=True)), ('preview', models.TextField(blank=True, null=True)), ('pages', models.IntegerField(default=0)), ('year', models.IntegerField(default=0)), ('price', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('price_ebook', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('sample', models.FileField(blank=True, null=True, upload_to=book.models.get_book_sample)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.get_book_image)), ('published', models.BooleanField(default=True)), ('created', models.DateTimeField(auto_now_add=True)), ('updated', models.DateTimeField(auto_now=True)), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')), ('tags', taggit.managers.TaggableManager( blank=True, help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Teacher')), ], options={ 'db_table': 'book', 'verbose_name_plural': 'Book', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('pages', '__first__'), ] operations = [ migrations.CreateModel( name='Asset', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('visual_artist', models.CharField(max_length=256)), ('animator', models.CharField(blank=True, max_length=256, null=True)), ('composer', models.CharField(blank=True, max_length=256, null=True)), ('locus', models.PositiveSmallIntegerField(default=0)), ('slug', models.SlugField(blank=True, editable=False)), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('type', models.CharField(choices=[('AUD', 'audio'), ('VID', 'video'), ('IMG', 'image'), ('IMA', 'image and audio'), ('TXA', 'text and audio')], max_length=3)), ('file', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ], ), migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.CharField(max_length=256)), ('slug', models.SlugField(blank=True, editable=False)), ('cover', models.ImageField( default='default_cover.jpg', upload_to=book.models.cover_media_upload_handler)), ('author', models.CharField(max_length=256)), ('publisher', models.CharField(max_length=256)), ('pub_date', models.CharField(blank=True, max_length=64, null=True)), ('copyright', models.CharField(blank=True, max_length=64, null=True)), ('isbn', models.CharField(blank=True, max_length=17, null=True)), ('reading_level', models.CharField(blank=True, max_length=32, null=True)), ('word_count', models.CharField(blank=True, max_length=5, null=True)), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('webpage', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='books', to='pages.Page')), ], ), migrations.CreateModel( name='BookPage', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('slug', models.SlugField(blank=True, editable=False)), ('type', models.CharField(choices=[('BPG', 'book pages'), ('GPG', 'game pages'), ('DPG', 'dashboard pages')], max_length=3)), ('name', models.CharField(blank=True, max_length=245, null=True)), ('is_title_page', models.BooleanField(default=False)), ('page_order', models.PositiveSmallIntegerField(blank=True, null=True)), ('headline', models.TextField()), ('created', models.DateTimeField(auto_now_add=True)), ('modified', models.DateTimeField(auto_now=True)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='pages', to='book.Book')), ], ), migrations.CreateModel( name='Line', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('order', models.PositiveSmallIntegerField()), ('audio', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ('page', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='lines', to='book.BookPage')), ], ), migrations.CreateModel( name='Word', fields=[ ('asset_ptr', models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='book.Asset')), ('text', models.CharField(blank=True, max_length=256, null=True)), ('audio', models.FileField( blank=True, null=True, upload_to=book.models.book_media_upload_handler)), ('length', models.PositiveSmallIntegerField()), ('line', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='words', to='book.Line')), ], bases=('book.asset', ), ), migrations.AddField( model_name='asset', name='bookpage', field=models.ForeignKey( on_delete=django.db.models.deletion.CASCADE, related_name='assets', to='book.BookPage'), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('book', '0001_initial'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('book_id', models.AutoField(primary_key=True, serialize=False)), ('name', models.CharField(max_length=20)), ('category', models.CharField(max_length=20)), ('publisher', models.CharField(max_length=15)), ('author', models.CharField(max_length=30)), ('origin_price', models.FloatField( max_length=6, validators=[book.validators.validate_not_negative_number ])), ('stock', models.IntegerField( default=0, validators=[book.validators.validate_not_negative_number ])), ('discount', models.DecimalField( decimal_places=2, default=1, max_digits=2, max_length=3, validators=[book.validators.validate_discount])), ('sale_number', models.IntegerField( default=0, validators=[book.validators.validate_not_negative_number ])), ('is_on_sale', models.BooleanField(default=True)), ('putaway_date', models.DateTimeField(auto_now_add=True)), ], ), migrations.CreateModel( name='BookDetail', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('cover', models.ImageField(default='img/cover/default.jpg', null=True, upload_to=book.models.get_book_file_path)), ('catalogue', models.FileField(null=True, upload_to=book.models.get_book_file_path)), ('summary', models.FileField(null=True, upload_to=book.models.get_book_file_path)), ('book', models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('taggit', '0002_auto_20150616_2121'), ('app', '0001_initial'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('code', models.CharField(max_length=10)), ('name', models.CharField(max_length=100)), ('slug', models.SlugField(blank=True, max_length=250, null=True)), ('title', models.CharField(blank=True, max_length=100, null=True)), ('preview', models.TextField(blank=True, null=True)), ('type', models.CharField(choices=[(b'B', b'Both'), (b'E', b'e-Book'), (b'P', b'Paperback')], max_length=1)), ('pages', models.IntegerField(default=0)), ('years', models.IntegerField(default=0)), ('qty', models.IntegerField(default=0)), ('price', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('price_ebook', models.DecimalField(decimal_places=2, default=0, max_digits=15)), ('example', models.FileField(blank=True, null=True, upload_to=book.models.get_book_exam_file)), ('image', models.FileField(blank=True, null=True, upload_to=book.models.get_book_file)), ('published', models.BooleanField(default=True)), ('category', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Category')), ('tags', taggit.managers.TaggableManager( help_text='A comma-separated list of tags.', through='taggit.TaggedItem', to='taggit.Tag', verbose_name='Tags')), ('teacher', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='app.Teacher')), ], options={ 'db_table': 'book', 'verbose_name_plural': 'Book', }, ), migrations.CreateModel( name='BookOption', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('option', models.CharField(max_length=50)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], options={ 'db_table': 'book_option', 'verbose_name_plural': 'BookOption', }, ), migrations.CreateModel( name='Register', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('name', models.CharField(max_length=100)), ('phone', models.CharField(max_length=20)), ('email', models.EmailField(max_length=100)), ('reg_date', models.DateTimeField(auto_now_add=True, null=True)), ('paid', models.BooleanField(default=False)), ('paid_date', models.DateTimeField(blank=True, null=True)), ('paid_via', models.CharField(blank=True, max_length=50, null=True)), ('delivered', models.BooleanField(default=False)), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ], options={ 'ordering': ['reg_date'], 'db_table': 'book_register', 'verbose_name_plural': 'Register', }, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name="SearchFdsnStationModel", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("network_code", models.CharField(blank=True, max_length=256)), ("station_code", models.CharField(blank=True, max_length=256)), ("site_name", models.CharField(blank=True, max_length=256)), ( "network_class", models.CharField( blank=True, choices=[ ("all", "All"), ("permanent", "Permanent"), ("temporary", "Temporary"), ], default="", max_length=256, ), ), ( "network_access", models.CharField( blank=True, choices=[ ("all", "All"), ("unrestricted", "Unrestricted"), ("restricted", "Restricted"), ], default="", max_length=256, ), ), ( "station_status", models.CharField( blank=True, choices=[ ("all", "All"), ("open", "Open"), ("closed", "Closed"), ], default="", max_length=256, ), ), ( "station_access", models.CharField( blank=True, choices=[ ("all", "All"), ("unrestricted", "Unrestricted"), ("restricted", "Restricted"), ], default="", max_length=256, ), ), ( "sensor_unit", models.CharField( blank=True, choices=[ ("all", "All"), ("m", "M"), ("ms", "M/S"), ("mss", "M/S^2"), ("pa", "PA"), ("c", "C"), ("deg", "DEG"), ("undefined", "Undefined"), ], default="", max_length=256, ), ), ( "sensor_type", models.CharField( blank=True, choices=[ ("all", "All"), ("vbb", "VBB"), ("bb", "BB"), ("sp", "SP"), ("sm", "SM"), ("obs", "OBS"), ("undefined", "Undefined"), ], default="", max_length=256, ), ), ( "latitude_min", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ( "latitude_max", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ( "longitude_min", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ( "longitude_max", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ("start_year_from", models.IntegerField(blank=True)), ("start_year_to", models.IntegerField(blank=True)), ("end_year_from", models.IntegerField(blank=True)), ("end_year_to", models.IntegerField(blank=True)), ( "geological_unit", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("alluvial_deposits", "Alluvial deposits"), ("ancient_alluvialterraces", "Ancient alluvial terraces"), ("argillite", "Argillite"), ("breccias", "Breccias"), ("clay", "Clay"), ("conglomerate", "Conglomerate"), ("debris", "Debris"), ("diabase", "Diabase"), ("dolomite", "Dolomite"), ("fillade", "Fillade"), ("fluvial_deposits", "Fluvial deposits"), ("gneiss", "Gneiss"), ("granite", "Granite"), ("jasper", "Jasper"), ("lacustrine_deposits", "Lacustrine deposits"), ("limestone", "Limestone"), ("marls", "Marls"), ("metamorphic_rock", "Metamorphic rock"), ("micaschist", "Micaschist"), ("morainic_deposits", "Morainic deposits"), ("ophiolite", "Ophiolite"), ("rhyolitic_ignimbrite", "Rhyolitic ignimbrite"), ("sand_deposits", "Sand deposits"), ("sandstone", "Sandstone"), ("schist", "Schist"), ("torbidite", "Torbidite"), ("volcanic_deposits", "Volcanic deposits"), ("volcanic_rocks", "Volcanic rocks"), ], default="", max_length=256, ), ), ( "morphology_class", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("t1", "T1"), ("t2", "T2"), ("t3", "T3"), ("t4", "T4"), ], default="", max_length=256, ), ), ( "ground_type_ec8", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("a", "A"), ("b", "B"), ("c", "C"), ("d", "D"), ("e", "E"), ("s1", "S1"), ("s2", "S2"), ], default="", max_length=256, ), ), ("basin_flag", models.BooleanField(default=False)), ( "vs30_from", models.DecimalField(blank=True, decimal_places=6, max_digits=12), ), ( "vs30_to", models.DecimalField(blank=True, decimal_places=6, max_digits=12), ), ( "f0_from", models.DecimalField(blank=True, decimal_places=6, max_digits=12), ), ( "f0_to", models.DecimalField(blank=True, decimal_places=6, max_digits=12), ), ], options={"managed": False,}, ), migrations.CreateModel( name="ExtEntityBase", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ( "ext_network_code", models.TextField(blank=True, default="", max_length=16384), ), ( "ext_network_start_year", models.TextField(blank=True, default="", max_length=16384), ), ( "ext_station_code", models.TextField(blank=True, default="", max_length=16384), ), ( "ext_station_start_year", models.TextField(blank=True, default="", max_length=16384), ), ("entity_removed", models.BooleanField(default=False)), ], ), migrations.CreateModel( name="FdsnNetwork", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("code", models.CharField(max_length=256)), ( "description", models.CharField(blank=True, default="", max_length=256), ), ( "start_date", models.DateTimeField(blank=True, default="", max_length=256), ), ( "restricted_status", models.CharField(blank=True, default="", max_length=256), ), ], options={"ordering": ["code"],}, ), migrations.CreateModel( name="FdsnNode", fields=[ ( "code", models.CharField( max_length=256, primary_key=True, serialize=False, unique=True ), ), ( "description", models.CharField(blank=True, default="", max_length=256), ), ( "url_dataselect", models.CharField(blank=True, default="", max_length=1024), ), ( "url_station", models.CharField(blank=True, default="", max_length=1024), ), ( "url_routing", models.CharField(blank=True, default="", max_length=1024), ), ( "url_wfcatalog", models.CharField(blank=True, default="", max_length=1024), ), ], ), migrations.CreateModel( name="FdsnStation", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("code", models.CharField(max_length=256)), ("site_name", models.CharField(blank=True, max_length=256)), ( "latitude", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ( "longitude", models.DecimalField(blank=True, decimal_places=6, max_digits=9), ), ( "elevation", models.DecimalField(blank=True, decimal_places=2, max_digits=6), ), ("restricted_status", models.CharField(blank=True, max_length=256)), ("start_date", models.DateTimeField(blank=True, max_length=256)), ( "end_date", models.DateTimeField(blank=True, max_length=256, null=True), ), ( "creation_date", models.DateTimeField(blank=True, max_length=256, null=True), ), ( "fdsn_network", models.ForeignKey( default=None, on_delete=django.db.models.deletion.CASCADE, related_name="fdsn_stations", to="book.FdsnNetwork", ), ), ], options={ "ordering": [ "fdsn_network__fdsn_node__code", "fdsn_network__code", "code", ], }, ), migrations.CreateModel( name="Link", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("url", models.CharField(blank=True, max_length=1024, null=True)), ("category", models.CharField(blank=True, max_length=1024, null=True)), ( "description", models.CharField(blank=True, max_length=1024, null=True), ), ], ), migrations.CreateModel( name="Profile", fields=[ ( "id", models.AutoField( auto_created=True, primary_key=True, serialize=False, verbose_name="ID", ), ), ("about", models.CharField(blank=True, max_length=1024)), ("location", models.CharField(blank=True, max_length=1024)), ("agency", models.CharField(blank=True, max_length=1024)), ("department", models.CharField(blank=True, max_length=1024)), ("telephone", models.CharField(blank=True, max_length=1024)), ("skype", models.CharField(blank=True, max_length=1024)), ( "fdsn_networks", models.ManyToManyField( blank=True, related_name="editors", to="book.FdsnNetwork" ), ), ( "user", models.OneToOneField( on_delete=django.db.models.deletion.CASCADE, related_name="profile", to=settings.AUTH_USER_MODEL, ), ), ], ), migrations.CreateModel( name="ExtAccessData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ("updated_at", models.DateTimeField(null=True)), ( "description", models.CharField(blank=True, default="Change", max_length=256), ), ], options={"ordering": ["-updated_at"],}, bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtBasicData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ( "description", models.TextField(blank=True, default="", max_length=16384), ), ("start", models.DateField(blank=True, null=True)), ("end", models.DateField(blank=True, null=True)), ( "imported_from_fdsn", models.DateTimeField(default=django.utils.timezone.now), ), ( "last_synced", models.DateTimeField(default=django.utils.timezone.now), ), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtBoreholeData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ("depth", models.IntegerField(default=0)), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtBoreholeLayerData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ( "description", models.CharField(blank=True, default="", max_length=256), ), ("depth_top", models.IntegerField(default=0)), ("depth_bottom", models.IntegerField(default=0)), ( "borehole_data", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="borehole_layers", to="book.ExtBoreholeData", ), ), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtHousingData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ( "description", models.TextField(blank=True, default="", max_length=16384), ), ( "housing_class", models.CharField( blank=True, choices=[ ("borehole", "Borehole"), ("bridge", "Bridge"), ("building", "Building"), ("cave", "Cave"), ("dam", "Dam"), ("free_field", "Free field"), ("other_structure", "Other structure"), ("tunnel", "Tunnel"), ("underground_shelter", "Underground shelter"), ("urban_free_field", "Urban free field"), ], default="", max_length=256, ), ), ("in_building", models.BooleanField(default=True)), ("numer_of_storeys", models.IntegerField(default=0)), ("distance_to_building", models.IntegerField(default=0)), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtMorphologyData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ( "description", models.TextField(blank=True, default="", max_length=16384), ), ( "geological_unit", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("alluvial_deposits", "Alluvial deposits"), ("ancient_alluvialterraces", "Ancient alluvial terraces"), ("argillite", "Argillite"), ("breccias", "Breccias"), ("clay", "Clay"), ("conglomerate", "Conglomerate"), ("debris", "Debris"), ("diabase", "Diabase"), ("dolomite", "Dolomite"), ("fillade", "Fillade"), ("fluvial_deposits", "Fluvial deposits"), ("gneiss", "Gneiss"), ("granite", "Granite"), ("jasper", "Jasper"), ("lacustrine_deposits", "Lacustrine deposits"), ("limestone", "Limestone"), ("marls", "Marls"), ("metamorphic_rock", "Metamorphic rock"), ("micaschist", "Micaschist"), ("morainic_deposits", "Morainic deposits"), ("ophiolite", "Ophiolite"), ("rhyolitic_ignimbrite", "Rhyolitic ignimbrite"), ("sand_deposits", "Sand deposits"), ("sandstone", "Sandstone"), ("schist", "Schist"), ("torbidite", "Torbidite"), ("volcanic_deposits", "Volcanic deposits"), ("volcanic_rocks", "Volcanic rocks"), ], default="", max_length=256, ), ), ( "morphology_class", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("t1", "T1"), ("t2", "T2"), ("t3", "T3"), ("t4", "T4"), ], default="", max_length=256, ), ), ( "ground_type_ec8", models.CharField( blank=True, choices=[ ("unknown", "Unknown"), ("a", "A"), ("b", "B"), ("c", "C"), ("d", "D"), ("e", "E"), ("s1", "S1"), ("s2", "S2"), ], default="", max_length=256, ), ), ("groundwater_depth", models.IntegerField(default=0)), ("vs_30", models.IntegerField(default=0)), ("f0", models.IntegerField(default=0)), ("amp_f0", models.IntegerField(default=0)), ("basin_flag", models.BooleanField(default=False)), ("bedrock_depth", models.IntegerField(default=0)), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="ExtOwnerData", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ( "name_first", models.CharField(blank=True, default="n/a", max_length=256), ), ( "name_last", models.CharField(blank=True, default="n/a", max_length=256), ), ( "department", models.CharField(blank=True, default="n/a", max_length=256), ), ("agency", models.CharField(blank=True, default="n/a", max_length=256)), ("city", models.CharField(blank=True, default="n/a", max_length=256)), ("street", models.CharField(blank=True, default="n/a", max_length=256)), ( "country", models.CharField(blank=True, default="n/a", max_length=256), ), ("phone", models.CharField(blank=True, default="n/a", max_length=256)), ("email", models.CharField(blank=True, default="n/a", max_length=256)), ], bases=("book.extentitybase",), ), migrations.CreateModel( name="Photo", fields=[ ( "extentitybase_ptr", models.OneToOneField( auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to="book.ExtEntityBase", ), ), ("description", models.CharField(blank=True, max_length=1024)), ( "image", models.ImageField(upload_to=book.models.Photo.path_file_name), ), ("uploaded_at", models.DateTimeField(auto_now_add=True)), ( "fdsn_station", models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="photos", to="book.FdsnStation", ), ), ], options={"ordering": ["uploaded_at"],}, bases=("book.extentitybase",), ), migrations.AddField( model_name="fdsnnetwork", name="fdsn_node", field=models.ForeignKey( default=None, on_delete=django.db.models.deletion.CASCADE, related_name="fdsn_networks", to="book.FdsnNode", ), ), migrations.AddField( model_name="fdsnstation", name="ext_basic_data", field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="station", to="book.ExtBasicData", ), ), migrations.AddField( model_name="fdsnstation", name="ext_borehole_data", field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="station", to="book.ExtBoreholeData", ), ), migrations.AddField( model_name="fdsnstation", name="ext_housing_data", field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="station", to="book.ExtHousingData", ), ), migrations.AddField( model_name="fdsnstation", name="ext_morphology_data", field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="station", to="book.ExtMorphologyData", ), ), migrations.AddField( model_name="fdsnstation", name="ext_owner_data", field=models.OneToOneField( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="station", to="book.ExtOwnerData", ), ), migrations.AlterUniqueTogether( name="fdsnnetwork", unique_together={("fdsn_node", "code", "start_date")}, ), migrations.AddField( model_name="extaccessdata", name="fdsn_station", field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="access_data", to="book.FdsnStation", ), ), migrations.AddField( model_name="extaccessdata", name="updated_by", field=models.ForeignKey( null=True, on_delete=django.db.models.deletion.SET_NULL, related_name="+", to=settings.AUTH_USER_MODEL, ), ), migrations.AlterUniqueTogether( name="fdsnstation", unique_together={("fdsn_network", "code", "start_date")}, ), ]
class Migration(migrations.Migration): initial = True dependencies = [ migrations.swappable_dependency(settings.AUTH_USER_MODEL), ] operations = [ migrations.CreateModel( name='Alarm', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('link_id', models.CharField(max_length=10)), ('category', models.CharField(default='user', max_length=32)), ('content', models.CharField(max_length=32)), ('is_new', models.BooleanField(default=True)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Article', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.TextField(blank=True)), ('content', models.TextField()), ('date', models.DateTimeField(blank=True, default=datetime.datetime.now)), ('is_long', models.BooleanField(default=False)), ('is_short', models.BooleanField(default=False)), ('is_phrase', models.BooleanField(default=False)), ('is_spoiler', models.BooleanField(default=False)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='articles', to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Book', fields=[ ('isbn', models.BigIntegerField(primary_key=True, serialize=False)), ('title', models.TextField()), ('contents', models.TextField(null=True)), ('author_contents', models.TextField(null=True)), ('url', models.TextField()), ('thumbnail', models.TextField()), ('authors', models.TextField()), ('publisher', models.TextField()), ('published_date', models.TextField(null=True)), ('like_users', models.ManyToManyField(to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Comment', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('content', models.TextField()), ('date', models.DateTimeField(auto_now_add=True)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ('parent', models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='replies', to='book.Comment')), ], options={ 'ordering': ('date',), }, ), migrations.CreateModel( name='Curation', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.TextField()), ('content', models.TextField()), ('date', models.DateTimeField(blank=True, default=datetime.datetime.now)), ('author', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='curations', to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Profile', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('nickname', models.CharField(blank=True, max_length=32)), ('profile_text', models.TextField(blank=True)), ('profile_photo', imagekit.models.fields.ProcessedImageField(default='https://react.semantic-ui.com/images/avatar/large/matthew.png', upload_to=book.models.profile_pic_path)), ('alarms', models.ManyToManyField(related_name='alarms', to='book.Alarm')), ('user', models.OneToOneField(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Library', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('title', models.TextField()), ('date', models.DateTimeField(blank=True, default=datetime.datetime.now)), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='Follow', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('followee', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='followee', to=settings.AUTH_USER_MODEL)), ('follower', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='follower', to=settings.AUTH_USER_MODEL)), ], ), migrations.CreateModel( name='CurationLike', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('curation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Curation')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='curation', name='like_users', field=models.ManyToManyField(through='book.CurationLike', to=settings.AUTH_USER_MODEL), ), migrations.CreateModel( name='BookInLibrary', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ('library', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Library')), ], ), migrations.CreateModel( name='BookInCuration', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('content', models.TextField()), ('book', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Book')), ('curation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='book_in_curation', to='book.Curation')), ], ), migrations.CreateModel( name='ArticleLike', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='book.Article')), ('user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), ], ), migrations.AddField( model_name='article', name='book', field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='articles', to='book.Book'), ), migrations.AddField( model_name='article', name='like_users', field=models.ManyToManyField(through='book.ArticleLike', to=settings.AUTH_USER_MODEL), ), migrations.CreateModel( name='CurationComment', fields=[ ('comment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='book.Comment')), ('curation', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='book.Curation')), ], bases=('book.comment',), ), migrations.CreateModel( name='ArticleComment', fields=[ ('comment_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='book.Comment')), ('article', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='comments', to='book.Article')), ], bases=('book.comment',), ), ]
class Migration(migrations.Migration): initial = True dependencies = [ ('auth', '0012_alter_user_first_name_max_length'), ] operations = [ migrations.CreateModel( name='Book', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ], ), migrations.CreateModel( name='Hotel', fields=[ ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), ('city', models.CharField(default=None, max_length=64)), ('name', models.CharField(default=None, max_length=64)), ('address', models.CharField(default=None, max_length=64)), ('overview', models.CharField(default=None, max_length=64)), ('highlight', models.CharField(default=None, max_length=64)), ('room_types', models.CharField(default=None, max_length=64)), ('rating', models.CharField(default=None, max_length=64)), ('price', models.FloatField(default=book.models.random_price)), ('latitude', models.FloatField(default=0)), ('longitude', models.FloatField(default=0)), ('imgurls', models.CharField(default=None, max_length=64)), ], ), 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=150, 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')), ('phone_contact', models.IntegerField(default=None)), ('address', models.CharField(default=None, max_length=64)), ('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')), ('user_permissions', 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')), ], options={ 'verbose_name': 'user', 'verbose_name_plural': 'users', 'abstract': False, }, managers=[ ('objects', django.contrib.auth.models.UserManager()), ], ), ]