-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add on_delete arguments to ForeignKeys
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.
- Loading branch information
Showing
17 changed files
with
124 additions
and
56 deletions.
There are no files selected for viewing
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
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,65 @@ | ||
# -*- coding: utf-8 -*- | ||
from __future__ import unicode_literals | ||
|
||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('multigtfs', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='farerule', | ||
name='contains', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='farerule', | ||
name='destination', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='farerule', | ||
name='origin', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='farerule', | ||
name='route', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='route', | ||
name='agency', | ||
field=models.ForeignKey(blank=True, null=True, help_text='Agency for this route.', on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Agency'), | ||
), | ||
migrations.AlterField( | ||
model_name='stop', | ||
name='parent_station', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='stop', | ||
name='zone', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='trip', | ||
name='block', | ||
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'), | ||
), | ||
migrations.AlterField( | ||
model_name='trip', | ||
name='service', | ||
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='multigtfs.Service'), | ||
), | ||
migrations.AlterField( | ||
model_name='trip', | ||
name='shape', | ||
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'), | ||
), | ||
] |
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
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
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
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
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
Oops, something went wrong.