bikemap/tracking/migrations/0001_initial.py

54 lines
1.9 KiB
Python
Raw Normal View History

2015-09-01 03:31:25 +00:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
2015-09-08 16:55:41 +00:00
from django.conf import settings
import django.contrib.gis.db.models.fields
2015-09-01 03:31:25 +00:00
class Migration(migrations.Migration):
dependencies = [
2015-09-08 16:55:41 +00:00
migrations.swappable_dependency(settings.AUTH_USER_MODEL),
2015-09-01 03:31:25 +00:00
]
operations = [
migrations.CreateModel(
name='Point',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('time', models.DateTimeField()),
('elevation', models.DecimalField(max_digits=20, decimal_places=2)),
2015-09-08 16:55:41 +00:00
('point', django.contrib.gis.db.models.fields.PointField(srid=4326)),
2015-09-01 03:31:25 +00:00
],
),
migrations.CreateModel(
name='Segment',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
2015-09-08 16:55:41 +00:00
('time', models.DateTimeField()),
('number', models.IntegerField(default=1)),
],
),
2015-09-01 03:31:25 +00:00
migrations.CreateModel(
name='Track',
fields=[
('id', models.AutoField(verbose_name='ID', serialize=False, auto_created=True, primary_key=True)),
('start', models.DateTimeField()),
('name', models.CharField(max_length=1024)),
('description', models.TextField(blank=True)),
2015-09-08 16:55:41 +00:00
('user', models.ForeignKey(to=settings.AUTH_USER_MODEL)),
2015-09-01 03:31:25 +00:00
],
),
migrations.AddField(
model_name='segment',
2015-09-01 03:31:25 +00:00
name='track',
field=models.ForeignKey(to='tracking.Track'),
),
migrations.AddField(
model_name='point',
name='segment',
field=models.ForeignKey(to='tracking.Segment'),
),
2015-09-01 03:31:25 +00:00
]