migrations were broken for postgres, so let's redo them

This commit is contained in:
Laura Klünder 2016-09-23 17:17:19 +02:00
parent 3c96a98344
commit 11742ad0d1
5 changed files with 12 additions and 97 deletions

View file

@ -1,7 +1,8 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-11 17:27
# Generated by Django 1.10.1 on 2016-09-23 15:15
from __future__ import unicode_literals
import c3nav.mapdata.fields
from django.db import migrations, models
import django.db.models.deletion
@ -18,8 +19,8 @@ class Migration(migrations.Migration):
name='Feature',
fields=[
('name', models.SlugField(help_text='e.g. noc', primary_key=True, serialize=False, verbose_name='feature identifier')),
('type', models.CharField(choices=[('building', 'Building'), ('room', 'Room'), ('obstacle', 'Obstacle')], max_length=50)),
('geometry', models.TextField()),
('feature_type', models.CharField(choices=[('building', 'Building'), ('room', 'Room'), ('outside', 'Outside Area'), ('obstacle', 'Obstacle')], max_length=50)),
('geometry', c3nav.mapdata.fields.GeometryField()),
],
),
migrations.CreateModel(
@ -28,7 +29,7 @@ class Migration(migrations.Migration):
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('language', models.CharField(max_length=50)),
('title', models.CharField(max_length=50)),
('feature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='titles', to='mapdata.Feature', verbose_name='map package')),
('feature', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='featuretitles', to='mapdata.Feature', verbose_name='map package')),
],
),
migrations.CreateModel(
@ -42,6 +43,8 @@ class Migration(migrations.Migration):
name='Package',
fields=[
('name', models.SlugField(help_text='e.g. de.c3nav.33c3.base', primary_key=True, serialize=False, verbose_name='package identifier')),
('home_repo', models.URLField(null=True, verbose_name='URL to the home git repository')),
('commit_id', models.CharField(max_length=40, null=True, verbose_name='current commit id')),
('bottom', models.DecimalField(decimal_places=2, max_digits=6, null=True, verbose_name='bottom coordinate')),
('left', models.DecimalField(decimal_places=2, max_digits=6, null=True, verbose_name='left coordinate')),
('top', models.DecimalField(decimal_places=2, max_digits=6, null=True, verbose_name='top coordinate')),
@ -66,6 +69,11 @@ class Migration(migrations.Migration):
name='package',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='levels', to='mapdata.Package', verbose_name='map package'),
),
migrations.AddField(
model_name='feature',
name='level',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='features', to='mapdata.Level', verbose_name='level'),
),
migrations.AddField(
model_name='feature',
name='package',

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.9 on 2016-09-12 13:01
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='package',
name='home_repo',
field=models.URLField(null=True, verbose_name='URL to the home git repository'),
),
]

View file

@ -1,20 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-13 16:12
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0002_package_home_repo'),
]
operations = [
migrations.AddField(
model_name='package',
name='commit_id',
field=models.CharField(max_length=40, null=True, verbose_name='current commit id'),
),
]

View file

@ -1,31 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-20 13:56
from __future__ import unicode_literals
import c3nav.mapdata.fields
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0003_package_commit_id'),
]
operations = [
migrations.RemoveField(
model_name='feature',
name='type',
),
migrations.AddField(
model_name='feature',
name='feature_type',
field=models.CharField(choices=[('building', 'Building'), ('room', 'Room'), ('outside', 'Outside Area'), ('obstacle', 'Obstacle')], default=None, max_length=50),
preserve_default=False,
),
migrations.AlterField(
model_name='feature',
name='geometry',
field=c3nav.mapdata.fields.GeometryField(),
),
]

View file

@ -1,22 +0,0 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.10.1 on 2016-09-23 10:58
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('mapdata', '0004_auto_20160920_1356'),
]
operations = [
migrations.AddField(
model_name='feature',
name='level',
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, related_name='features', to='mapdata.Level', verbose_name='level'),
preserve_default=False,
),
]