diff options
Diffstat (limited to 'app/locations/migrations/0001_initial.py')
-rw-r--r-- | app/locations/migrations/0001_initial.py | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/app/locations/migrations/0001_initial.py b/app/locations/migrations/0001_initial.py new file mode 100644 index 0000000..1854dbf --- /dev/null +++ b/app/locations/migrations/0001_initial.py @@ -0,0 +1,104 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.11.5 on 2017-12-14 22:25 +from __future__ import unicode_literals + +import django.contrib.gis.db.models.fields +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + initial = True + + dependencies = [ + ] + + operations = [ + migrations.CreateModel( + name='Country', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('area', models.IntegerField(help_text='Area of Country in SQ meters')), + ('pop2005', models.IntegerField(verbose_name='Population 2005')), + ('fips', models.CharField(help_text='<a href="http://www.census.gov/geo/www/fips/fips.html">Federal Information Processing Standard Code</a>', max_length=2, verbose_name='FIPS Code')), + ('iso2', models.CharField(help_text='<a href="http://www.iso.org/">International Organization for Standardization</a>', max_length=2, verbose_name='2 Digit ISO')), + ('iso3', models.CharField(help_text='<a href="http://www.iso.org/">International Organization for Standardization</a>', max_length=3, verbose_name='3 Digit ISO')), + ('un', models.IntegerField(verbose_name='United Nations Code')), + ('region', models.IntegerField(choices=[(0, 'MISC'), (2, 'Africa'), (9, 'Oceania'), (19, 'Americas'), (142, 'Asia'), (150, 'Europe')], verbose_name='Region Code')), + ('subregion', models.IntegerField(choices=[(0, 'MISC'), (5, 'South America'), (11, 'Western Africa'), (13, 'Central America'), (14, 'Eastern Africa'), (15, 'Northern Africa'), (17, 'Middle Africa'), (18, 'Southern Africa'), (21, 'North America'), (29, 'Caribbean'), (30, 'Eastern Asia'), (34, 'Southern Asia'), (35, 'Southeast Asia'), (39, 'Southern Europe'), (53, 'Australia and New Zealand'), (54, 'Melanesia'), (57, 'Micronesia'), (61, 'Polynesia'), (143, 'Central Asia'), (145, 'Western Asia'), (151, 'Eastern Europe'), (154, 'Northern Europe'), (155, 'Western Europe')], verbose_name='Sub-Region Code')), + ('lon', models.FloatField(help_text='Longitude of centerpoint', verbose_name='Longitude')), + ('lat', models.FloatField(help_text='Latitude of centerpoint', verbose_name='Latitude')), + ('zoom_level', models.CharField(max_length=2, null=True)), + ('slug', models.SlugField(null=True)), + ('visited', models.BooleanField(default=False)), + ('pub_date', models.DateTimeField(null=True, verbose_name='Date published')), + ('geometry', django.contrib.gis.db.models.fields.MultiPolygonField(srid=4326, verbose_name='Country Border')), + ], + options={ + 'verbose_name_plural': 'Countries', + 'ordering': ['name'], + }, + ), + migrations.CreateModel( + name='Location', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('slug', models.SlugField()), + ('pub_date', models.DateTimeField(null=True, verbose_name='Date published')), + ('geometry', django.contrib.gis.db.models.fields.MultiPolygonField(srid=4326)), + ], + ), + migrations.CreateModel( + name='Region', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=50)), + ('slug', models.SlugField()), + ('pub_date', models.DateTimeField(null=True, verbose_name='Date published')), + ('geometry', django.contrib.gis.db.models.fields.MultiPolygonField(null=True, srid=4326)), + ('lon', models.FloatField(help_text='Longitude of centerpoint', null=True, verbose_name='Longitude')), + ('lat', models.FloatField(help_text='Latitude of centerpoint', null=True, verbose_name='Latitude')), + ('zoom_level', models.CharField(max_length=2, null=True)), + ], + ), + migrations.CreateModel( + name='Route', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(max_length=200)), + ('slug', models.SlugField()), + ('zoom', models.CharField(max_length=2, null=True)), + ('template_var_name', models.CharField(max_length=10, null=True)), + ('pub_date', models.DateTimeField(null=True, verbose_name='Date published')), + ('geometry', django.contrib.gis.db.models.fields.MultiPointField(srid=4326)), + ], + ), + migrations.CreateModel( + name='State', + fields=[ + ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), + ('name', models.CharField(blank=True, max_length=250, null=True)), + ('slug', models.SlugField()), + ('code', models.CharField(blank=True, max_length=2, null=True)), + ('pub_date', models.DateTimeField(null=True, verbose_name='Date published')), + ('geometry', django.contrib.gis.db.models.fields.MultiPolygonField(null=True, srid=4326)), + ('country', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='locations.Country')), + ], + options={ + 'ordering': ['name'], + }, + ), + migrations.AddField( + model_name='location', + name='state', + field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='locations.State'), + ), + migrations.AddField( + model_name='country', + name='lux_region', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, to='locations.Region'), + ), + ] |