mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-05 05:37:50 +02:00
Refactor roster and initial support for consists
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# Generated by Django 4.0.2 on 2022-04-02 09:22
|
||||
# Generated by Django 4.0.2 on 2022-04-02 14:25
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.db.models.deletion
|
||||
@@ -10,8 +10,8 @@ class Migration(migrations.Migration):
|
||||
initial = True
|
||||
|
||||
dependencies = [
|
||||
('roster', '0001_initial'),
|
||||
('metadata', '0001_initial'),
|
||||
('roster', '0005_remove_consistitem_consist_and_more'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
@@ -20,6 +20,7 @@ class Migration(migrations.Migration):
|
||||
fields=[
|
||||
('uuid', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
|
||||
('identifier', models.CharField(max_length=128)),
|
||||
('address', models.SmallIntegerField(blank=True, default=None, null=True)),
|
||||
('epoch', models.CharField(blank=True, max_length=32)),
|
||||
('notes', models.TextField(blank=True)),
|
||||
('creation_time', models.DateTimeField(auto_now_add=True)),
|
||||
@@ -32,8 +33,12 @@ class Migration(migrations.Migration):
|
||||
name='ConsistItem',
|
||||
fields=[
|
||||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
||||
('order', models.PositiveIntegerField(default=0)),
|
||||
('consist', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='consist.consist')),
|
||||
('rolling_stock', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='roster.rollingstock')),
|
||||
],
|
||||
options={
|
||||
'ordering': ['order'],
|
||||
},
|
||||
),
|
||||
]
|
||||
|
@@ -1,22 +0,0 @@
|
||||
# Generated by Django 4.0.2 on 2022-04-02 09:25
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('consist', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterModelOptions(
|
||||
name='consistitem',
|
||||
options={'ordering': ['order']},
|
||||
),
|
||||
migrations.AddField(
|
||||
model_name='consistitem',
|
||||
name='order',
|
||||
field=models.PositiveIntegerField(default=0),
|
||||
),
|
||||
]
|
@@ -0,0 +1,23 @@
|
||||
# Generated by Django 4.0.2 on 2022-04-02 16:18
|
||||
|
||||
from django.db import migrations
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('consist', '0001_initial'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.RenameField(
|
||||
model_name='consist',
|
||||
old_name='address',
|
||||
new_name='consist_address',
|
||||
),
|
||||
migrations.RenameField(
|
||||
model_name='consist',
|
||||
old_name='epoch',
|
||||
new_name='era',
|
||||
),
|
||||
]
|
@@ -1,18 +0,0 @@
|
||||
# Generated by Django 4.0.2 on 2022-04-02 10:36
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('consist', '0002_alter_consistitem_options_consistitem_order'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='consist',
|
||||
name='address',
|
||||
field=models.SmallIntegerField(blank=True, default=None, null=True),
|
||||
),
|
||||
]
|
Reference in New Issue
Block a user