-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Restore previous sensorssafrca+openstuttgart migrations
The migrations files in the sensorsafrica directory will resolve the migration issues and prompt removal of pip installing opendata-stuttgart master feinstaub-api
- Loading branch information
1 parent
4e286f6
commit b43c815
Showing
26 changed files
with
887 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
Empty file.
Empty file.
91 changes: 91 additions & 0 deletions
91
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0001_initial.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import django.utils.timezone | ||
import django_extensions.db.fields | ||
from django.conf import settings | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Sensor', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('uid', models.SlugField(unique=True)), | ||
('description', models.CharField(max_length=10000)), | ||
('owner', models.ForeignKey(to=settings.AUTH_USER_MODEL)), | ||
], | ||
options={ | ||
'get_latest_by': 'modified', | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.CreateModel( | ||
name='SensorData', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('value1', models.IntegerField()), | ||
('value2', models.IntegerField(blank=True, null=True)), | ||
('sensor', models.ForeignKey(to='sensors.Sensor')), | ||
], | ||
options={ | ||
'get_latest_by': 'modified', | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.CreateModel( | ||
name='SensorLocation', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('location', models.TextField(blank=True, null=True)), | ||
('sensor', models.ForeignKey(to='sensors.Sensor')), | ||
], | ||
options={ | ||
'get_latest_by': 'modified', | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.CreateModel( | ||
name='SensorType', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, serialize=False, verbose_name='ID', primary_key=True)), | ||
('created', django_extensions.db.fields.CreationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(blank=True, default=django.utils.timezone.now, editable=False, verbose_name='modified')), | ||
('uid', models.SlugField(unique=True)), | ||
('name', models.CharField(max_length=1000)), | ||
('manufacturer', models.CharField(max_length=1000)), | ||
('description', models.CharField(max_length=10000)), | ||
], | ||
options={ | ||
'get_latest_by': 'modified', | ||
'ordering': ('-modified', '-created'), | ||
'abstract': False, | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.AddField( | ||
model_name='sensor', | ||
name='sensor_type', | ||
field=models.ForeignKey(to='sensors.SensorType'), | ||
preserve_default=True, | ||
), | ||
] |
28 changes: 28 additions & 0 deletions
28
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0002_auto_20150330_1800.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import datetime | ||
from django.utils.timezone import utc | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='sensordata', | ||
name='timestamp', | ||
field=models.DateTimeField(default=datetime.datetime(2015, 3, 30, 18, 0, 43, 397896, tzinfo=utc)), | ||
preserve_default=True, | ||
), | ||
migrations.AddField( | ||
model_name='sensorlocation', | ||
name='timestamp', | ||
field=models.DateTimeField(default=datetime.datetime(2015, 3, 30, 18, 0, 43, 398539, tzinfo=utc)), | ||
preserve_default=True, | ||
), | ||
] |
33 changes: 33 additions & 0 deletions
33
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0003_auto_20150330_1805.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0002_auto_20150330_1800'), | ||
] | ||
|
||
operations = [ | ||
migrations.AddField( | ||
model_name='sensordata', | ||
name='sampling_rate', | ||
field=models.IntegerField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='sensordata', | ||
name='timestamp', | ||
field=models.DateTimeField(default=django.utils.timezone.now), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='sensorlocation', | ||
name='timestamp', | ||
field=models.DateTimeField(default=django.utils.timezone.now), | ||
preserve_default=True, | ||
), | ||
] |
83 changes: 83 additions & 0 deletions
83
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0004_auto_20150331_1907.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
from django.conf import settings | ||
import django_extensions.db.fields | ||
import django.utils.timezone | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('sensors', '0003_auto_20150330_1805'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='SensorDataValue', | ||
fields=[ | ||
('id', models.AutoField(serialize=False, primary_key=True, auto_created=True, verbose_name='ID')), | ||
('created', django_extensions.db.fields.CreationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True, verbose_name='created')), | ||
('modified', django_extensions.db.fields.ModificationDateTimeField(editable=False, default=django.utils.timezone.now, blank=True, verbose_name='modified')), | ||
('value', models.TextField()), | ||
('value_type', models.CharField(choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('brightness', 'Brightness')], max_length=100)), | ||
('sensordata', models.ForeignKey(to='sensors.SensorData')), | ||
], | ||
options={ | ||
'abstract': False, | ||
'ordering': ('-modified', '-created'), | ||
'get_latest_by': 'modified', | ||
}, | ||
bases=(models.Model,), | ||
), | ||
migrations.RemoveField( | ||
model_name='sensordata', | ||
name='value1', | ||
), | ||
migrations.RemoveField( | ||
model_name='sensordata', | ||
name='value2', | ||
), | ||
migrations.RemoveField( | ||
model_name='sensorlocation', | ||
name='sensor', | ||
), | ||
migrations.AddField( | ||
model_name='sensor', | ||
name='location', | ||
field=models.ForeignKey(default=False, to='sensors.SensorLocation'), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='sensordata', | ||
name='location', | ||
field=models.ForeignKey(default=1, blank=True, to='sensors.SensorLocation'), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='sensorlocation', | ||
name='description', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
migrations.AddField( | ||
model_name='sensorlocation', | ||
name='indoor', | ||
field=models.BooleanField(default=False), | ||
preserve_default=False, | ||
), | ||
migrations.AddField( | ||
model_name='sensorlocation', | ||
name='owner', | ||
field=models.ForeignKey(blank=True, help_text='If not set, location is public.', null=True, to=settings.AUTH_USER_MODEL), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='sensor', | ||
name='description', | ||
field=models.TextField(null=True, blank=True), | ||
preserve_default=True, | ||
), | ||
] |
26 changes: 26 additions & 0 deletions
26
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0005_auto_20150403_2041.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0004_auto_20150331_1907'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensorlocation', | ||
name='indoor', | ||
field=models.BooleanField(default=False), | ||
preserve_default=True, | ||
), | ||
migrations.AlterField( | ||
model_name='sensortype', | ||
name='description', | ||
field=models.CharField(max_length=10000, blank=True, null=True), | ||
preserve_default=True, | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0006_auto_20150404_2050.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0005_auto_20150403_2041'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='value_type', | ||
field=models.CharField(max_length=100, choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('durP1', 'duration 1µm'), ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('brightness', 'Brightness')]), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0007_auto_20150405_2151.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0006_auto_20150404_2050'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='sensordata', | ||
field=models.ForeignKey(to='sensors.SensorData', related_name='sensordatavalues'), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0008_auto_20150503_1554.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0007_auto_20150405_2151'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensordata', | ||
name='sampling_rate', | ||
field=models.IntegerField(blank=True, null=True, help_text='in milliseconds'), | ||
), | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='value_type', | ||
field=models.CharField(max_length=100, choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('durP1', 'duration 1µm'), ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('pressure', 'Pa'), ('altitude', 'meter'), ('pressure_sealevel', 'Pa'), ('brightness', 'Brightness'), ('dust_density', 'Dust density in mg/m3'), ('vo_raw', 'Dust voltage raw'), ('voltage', 'Dust voltage calculated'), ('P10', '1µm particles'), ('P25', '2.5µm particles'), ('durP10', 'duration 1µm'), ('durP25', 'duration 2.5µm'), ('ratioP10', 'ratio 1µm in percent'), ('ratioP20', 'ratio 2.5µm in percent')]), | ||
), | ||
] |
19 changes: 19 additions & 0 deletions
19
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0009_auto_20150503_1556.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0008_auto_20150503_1554'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='value_type', | ||
field=models.CharField(max_length=100, choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('durP1', 'duration 1µm'), ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('pressure', 'Pa'), ('altitude', 'meter'), ('pressure_sealevel', 'Pa'), ('brightness', 'Brightness'), ('dust_density', 'Dust density in mg/m3'), ('vo_raw', 'Dust voltage raw'), ('voltage', 'Dust voltage calculated'), ('P10', '1µm particles'), ('P25', '2.5µm particles'), ('durP10', 'duration 1µm'), ('durP25', 'duration 2.5µm'), ('ratioP10', 'ratio 1µm in percent'), ('ratioP25', 'ratio 2.5µm in percent')]), | ||
), | ||
] |
24 changes: 24 additions & 0 deletions
24
sensorsafrica/openstuttgart/feinstaub/sensors/migrations/0010_auto_20150620_1708.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import models, migrations | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sensors', '0009_auto_20150503_1556'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='value', | ||
field=models.TextField(db_index=True), | ||
), | ||
migrations.AlterField( | ||
model_name='sensordatavalue', | ||
name='value_type', | ||
field=models.CharField(choices=[('P1', '1µm particles'), ('P2', '2.5µm particles'), ('durP1', 'duration 1µm'), ('durP2', 'duration 2.5µm'), ('ratioP1', 'ratio 1µm in percent'), ('ratioP2', 'ratio 2.5µm in percent'), ('temperature', 'Temperature'), ('humidity', 'Humidity'), ('pressure', 'Pa'), ('altitude', 'meter'), ('pressure_sealevel', 'Pa (sealevel)'), ('brightness', 'Brightness'), ('dust_density', 'Dust density in mg/m3'), ('vo_raw', 'Dust voltage raw'), ('voltage', 'Dust voltage calculated'), ('P10', '1µm particles'), ('P25', '2.5µm particles'), ('durP10', 'duration 1µm'), ('durP25', 'duration 2.5µm'), ('ratioP10', 'ratio 1µm in percent'), ('ratioP25', 'ratio 2.5µm in percent')], max_length=100, db_index=True), | ||
), | ||
] |
Oops, something went wrong.