update models
This commit is contained in:
parent
565739f790
commit
545a7dd50f
2 changed files with 39 additions and 33 deletions
|
@ -1,5 +1,5 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
# Generated by Django 1.9.9 on 2016-08-23 10:10
|
||||
# Generated by Django 1.9.9 on 2016-08-25 11:37
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
@ -15,10 +15,21 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.CreateModel(
|
||||
name='Bounds',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('bottom', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='bottom coordinate')),
|
||||
('left', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='left coordinate')),
|
||||
('top', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='top coordinate')),
|
||||
('right', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='right coordinate')),
|
||||
],
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='MapLevel',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('name', models.CharField(help_text='Usually just an integer (e.g. -1, 0, 1, 2)', max_length=50, unique=True, verbose_name='level name')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
@ -29,7 +40,9 @@ class Migration(migrations.Migration):
|
|||
name='MapPackage',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('extends', models.ForeignKey(null=True, on_delete=django.db.models.deletion.PROTECT, related_name='extended_by', to='mapdata.MapPackage', verbose_name='extends map package')),
|
||||
('name', models.CharField(help_text='e.g. de.c3nav.33c3.base', max_length=50, unique=True, verbose_name='package identifier')),
|
||||
('map', models.CharField(help_text='e.g. de.c3nav.33c3', max_length=50, verbose_name='map identifier')),
|
||||
('bounds', models.OneToOneField(null=True, on_delete=django.db.models.deletion.PROTECT, to='mapdata.Bounds', verbose_name='bounds')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
|
@ -45,27 +58,22 @@ class Migration(migrations.Migration):
|
|||
('master', models.ForeignKey(editable=False, null=True, on_delete=django.db.models.deletion.CASCADE, related_name='translations', to='mapdata.MapPackage')),
|
||||
],
|
||||
options={
|
||||
'managed': True,
|
||||
'default_permissions': (),
|
||||
'db_tablespace': '',
|
||||
'verbose_name': 'map package Translation',
|
||||
'managed': True,
|
||||
'db_table': 'mapdata_mappackage_translation',
|
||||
'default_permissions': (),
|
||||
},
|
||||
),
|
||||
migrations.CreateModel(
|
||||
name='MapSource',
|
||||
fields=[
|
||||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('bottom', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='bottom coordinate')),
|
||||
('left', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='left coordinate')),
|
||||
('top', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='top coordinate')),
|
||||
('right', models.DecimalField(decimal_places=2, max_digits=6, verbose_name='right coordinate')),
|
||||
('name', models.SlugField(unique=True, verbose_name='source name')),
|
||||
('image', models.FileField(upload_to='mapsources/', verbose_name='source image')),
|
||||
('bounds', models.OneToOneField(on_delete=django.db.models.deletion.PROTECT, to='mapdata.Bounds', verbose_name='bounds')),
|
||||
('package', models.ForeignKey(on_delete=django.db.models.deletion.PROTECT, related_name='sources', to='mapdata.MapPackage', verbose_name='map package')),
|
||||
],
|
||||
options={
|
||||
'abstract': False,
|
||||
},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='maplevel',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue