You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This attribute will be required in Django 2.0. Update initial migration
to include the default of CASCADE, and then use better choices for
applicable models.
('agency', models.ForeignKey(blank=True, to='multigtfs.Agency', help_text='Agency for this route.', null=True)),
138
-
('feed', models.ForeignKey(to='multigtfs.Feed')),
137
+
('agency', models.ForeignKey(blank=True, to='multigtfs.Agency', help_text='Agency for this route.', null=True, on_delete=django.db.models.deletion.CASCADE)),
('parent_station', models.ForeignKey(blank=True, to='multigtfs.Stop', help_text='The station associated with the stop', null=True, on_delete=django.db.models.deletion.CASCADE)),
225
225
],
226
226
options={
227
227
'db_table': 'stop',
@@ -240,7 +240,7 @@ class Migration(migrations.Migration):
240
240
('drop_off_type', models.CharField(blank=True, help_text='How passengers are picked up', max_length=1, choices=[('0', 'Regularly scheduled drop off'), ('1', 'No drop off available'), ('2', 'Must phone agency to arrange drop off'), ('3', 'Must coordinate with driver to arrange drop off')])),
241
241
('shape_dist_traveled', models.FloatField(help_text='Distance of stop from start of shape', null=True, verbose_name='shape distance traveled', blank=True)),
@@ -254,8 +254,8 @@ class Migration(migrations.Migration):
254
254
('transfer_type', models.IntegerField(default=0, help_text='What kind of transfer?', blank=True, choices=[(0, 'Recommended transfer point'), (1, 'Timed transfer point (vehicle will wait)'), (2, 'min_transfer_time needed to successfully transfer'), (3, 'No transfers possible')])),
255
255
('min_transfer_time', models.IntegerField(help_text='How many seconds are required to transfer?', null=True, blank=True)),
('from_stop', models.ForeignKey(related_name='transfer_from_stop', to='multigtfs.Stop', help_text='Stop where a connection between routes begins.')),
258
-
('to_stop', models.ForeignKey(related_name='transfer_to_stop', to='multigtfs.Stop', help_text='Stop where a connection between routes ends.')),
257
+
('from_stop', models.ForeignKey(related_name='transfer_from_stop', to='multigtfs.Stop', help_text='Stop where a connection between routes begins.', on_delete=django.db.models.deletion.CASCADE)),
258
+
('to_stop', models.ForeignKey(related_name='transfer_to_stop', to='multigtfs.Stop', help_text='Stop where a connection between routes ends.', on_delete=django.db.models.deletion.CASCADE)),
259
259
],
260
260
options={
261
261
'db_table': 'transfer',
@@ -274,10 +274,10 @@ class Migration(migrations.Migration):
274
274
('wheelchair_accessible', models.CharField(blank=True, help_text='Are there accommodations for riders with wheelchair?', max_length=1, choices=[('0', 'No information'), ('1', 'Some wheelchair accommodation'), ('2', 'No wheelchair accommodation')])),
('shape', models.ForeignKey(blank=True, to='multigtfs.Shape', help_text='Shape used for this trip', null=True)),
277
+
('block', models.ForeignKey(blank=True, to='multigtfs.Block', help_text='Block of sequential trips that this trip belongs to.', null=True, on_delete=django.db.models.deletion.CASCADE)),
('shape', models.ForeignKey(blank=True, to='multigtfs.Shape', help_text='Shape used for this trip', null=True, on_delete=django.db.models.deletion.CASCADE)),
281
281
],
282
282
options={
283
283
'db_table': 'trip',
@@ -289,7 +289,7 @@ class Migration(migrations.Migration):
field=models.ForeignKey(blank=True, to='multigtfs.Zone', help_text='Fare zone for a stop ID.', null=True),
308
+
field=models.ForeignKey(blank=True, to='multigtfs.Zone', help_text='Fare zone for a stop ID.', null=True, on_delete=django.db.models.deletion.CASCADE),
field=models.ForeignKey(related_name='fare_contains', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel withing this zone.', null=True),
320
+
field=models.ForeignKey(related_name='fare_contains', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel withing this zone.', null=True, on_delete=django.db.models.deletion.CASCADE),
321
321
preserve_default=True,
322
322
),
323
323
migrations.AddField(
324
324
model_name='farerule',
325
325
name='destination',
326
-
field=models.ForeignKey(related_name='fare_destinations', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel ending in this zone.', null=True),
326
+
field=models.ForeignKey(related_name='fare_destinations', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel ending in this zone.', null=True, on_delete=django.db.models.deletion.CASCADE),
field=models.ForeignKey(related_name='fare_origins', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel originating in this zone.', null=True),
338
+
field=models.ForeignKey(related_name='fare_origins', blank=True, to='multigtfs.Zone', help_text='Fare class is valid for travel originating in this zone.', null=True, on_delete=django.db.models.deletion.CASCADE),
339
339
preserve_default=True,
340
340
),
341
341
migrations.AddField(
342
342
model_name='farerule',
343
343
name='route',
344
-
field=models.ForeignKey(blank=True, to='multigtfs.Route', help_text='Fare class is valid for this route.', null=True),
344
+
field=models.ForeignKey(blank=True, to='multigtfs.Route', help_text='Fare class is valid for this route.', null=True, on_delete=django.db.models.deletion.CASCADE),
field=models.ForeignKey(blank=True, null=True, help_text='Fare class is valid for travel withing this zone.', related_name='fare_contains', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Zone'),
19
+
),
20
+
migrations.AlterField(
21
+
model_name='farerule',
22
+
name='destination',
23
+
field=models.ForeignKey(blank=True, null=True, help_text='Fare class is valid for travel ending in this zone.', related_name='fare_destinations', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Zone'),
24
+
),
25
+
migrations.AlterField(
26
+
model_name='farerule',
27
+
name='origin',
28
+
field=models.ForeignKey(blank=True, null=True, help_text='Fare class is valid for travel originating in this zone.', related_name='fare_origins', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Zone'),
29
+
),
30
+
migrations.AlterField(
31
+
model_name='farerule',
32
+
name='route',
33
+
field=models.ForeignKey(blank=True, null=True, help_text='Fare class is valid for this route.', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Route'),
34
+
),
35
+
migrations.AlterField(
36
+
model_name='route',
37
+
name='agency',
38
+
field=models.ForeignKey(blank=True, null=True, help_text='Agency for this route.', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Agency'),
39
+
),
40
+
migrations.AlterField(
41
+
model_name='stop',
42
+
name='parent_station',
43
+
field=models.ForeignKey(blank=True, null=True, help_text='The station associated with the stop', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Stop'),
44
+
),
45
+
migrations.AlterField(
46
+
model_name='stop',
47
+
name='zone',
48
+
field=models.ForeignKey(blank=True, null=True, help_text='Fare zone for a stop ID.', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Zone'),
49
+
),
50
+
migrations.AlterField(
51
+
model_name='trip',
52
+
name='block',
53
+
field=models.ForeignKey(blank=True, null=True, help_text='Block of sequential trips that this trip belongs to.', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Block'),
field=models.ForeignKey(blank=True, null=True, help_text='Shape used for this trip', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Shape'),
0 commit comments