Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
AE UTBM
Sith
Commits
f7548ab8
Verified
Commit
f7548ab8
authored
Oct 06, 2019
by
Sli
Browse files
django2.2: add on_delete on migrations for OneToOneField
parent
3cb306bc
Changes
11
Show whitespace changes
Inline
Side-by-side
accounting/migrations/0002_auto_20160824_2152.py
View file @
f7548ab8
...
@@ -40,6 +40,7 @@ class Migration(migrations.Migration):
...
@@ -40,6 +40,7 @@ class Migration(migrations.Migration):
model_name
=
"operation"
,
model_name
=
"operation"
,
name
=
"linked_operation"
,
name
=
"linked_operation"
,
field
=
models
.
OneToOneField
(
field
=
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
blank
=
True
,
blank
=
True
,
to
=
"accounting.Operation"
,
to
=
"accounting.Operation"
,
null
=
True
,
null
=
True
,
...
...
club/migrations/0002_auto_20160824_2152.py
View file @
f7548ab8
...
@@ -36,6 +36,7 @@ class Migration(migrations.Migration):
...
@@ -36,6 +36,7 @@ class Migration(migrations.Migration):
model_name
=
"club"
,
model_name
=
"club"
,
name
=
"home"
,
name
=
"home"
,
field
=
models
.
OneToOneField
(
field
=
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
blank
=
True
,
blank
=
True
,
null
=
True
,
null
=
True
,
related_name
=
"home_of_club"
,
related_name
=
"home_of_club"
,
...
...
club/migrations/0010_auto_20170912_2028.py
View file @
f7548ab8
...
@@ -5,6 +5,7 @@ from django.db import migrations, models
...
@@ -5,6 +5,7 @@ from django.db import migrations, models
from
club.models
import
Club
from
club.models
import
Club
from
core.operations
import
PsqlRunOnly
from
core.operations
import
PsqlRunOnly
import
django.db.models.deletion
def
generate_club_pages
(
apps
,
schema_editor
):
def
generate_club_pages
(
apps
,
schema_editor
):
...
@@ -31,7 +32,11 @@ class Migration(migrations.Migration):
...
@@ -31,7 +32,11 @@ class Migration(migrations.Migration):
model_name
=
"club"
,
model_name
=
"club"
,
name
=
"page"
,
name
=
"page"
,
field
=
models
.
OneToOneField
(
field
=
models
.
OneToOneField
(
related_name
=
"club"
,
blank
=
True
,
null
=
True
,
to
=
"core.Page"
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"club"
,
blank
=
True
,
null
=
True
,
to
=
"core.Page"
,
),
),
),
),
migrations
.
AddField
(
migrations
.
AddField
(
...
...
core/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -277,6 +277,7 @@ class Migration(migrations.Migration):
...
@@ -277,6 +277,7 @@ class Migration(migrations.Migration):
(
(
"group_ptr"
,
"group_ptr"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
primary_key
=
True
,
primary_key
=
True
,
parent_link
=
True
,
parent_link
=
True
,
serialize
=
False
,
serialize
=
False
,
...
@@ -431,7 +432,9 @@ class Migration(migrations.Migration):
...
@@ -431,7 +432,9 @@ class Migration(migrations.Migration):
(
(
"user"
,
"user"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
to
=
settings
.
AUTH_USER_MODEL
,
related_name
=
"preferences"
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
,
related_name
=
"preferences"
,
),
),
),
),
],
],
...
@@ -525,6 +528,7 @@ class Migration(migrations.Migration):
...
@@ -525,6 +528,7 @@ class Migration(migrations.Migration):
model_name
=
"user"
,
model_name
=
"user"
,
name
=
"home"
,
name
=
"home"
,
field
=
models
.
OneToOneField
(
field
=
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
blank
=
True
,
blank
=
True
,
null
=
True
,
null
=
True
,
related_name
=
"home_of"
,
related_name
=
"home_of"
,
...
...
core/migrations/0023_auto_20170902_1226.py
View file @
f7548ab8
...
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
...
@@ -3,6 +3,7 @@ from __future__ import unicode_literals
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
from
django.conf
import
settings
from
django.conf
import
settings
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
...
@@ -35,7 +36,9 @@ class Migration(migrations.Migration):
...
@@ -35,7 +36,9 @@ class Migration(migrations.Migration):
model_name
=
"preferences"
,
model_name
=
"preferences"
,
name
=
"user"
,
name
=
"user"
,
field
=
models
.
OneToOneField
(
field
=
models
.
OneToOneField
(
related_name
=
"_preferences"
,
to
=
settings
.
AUTH_USER_MODEL
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"_preferences"
,
to
=
settings
.
AUTH_USER_MODEL
,
),
),
),
),
]
]
counter/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -66,7 +66,10 @@ class Migration(migrations.Migration):
...
@@ -66,7 +66,10 @@ class Migration(migrations.Migration):
(
(
"user"
,
"user"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
primary_key
=
True
,
serialize
=
False
,
to
=
settings
.
AUTH_USER_MODEL
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
primary_key
=
True
,
serialize
=
False
,
to
=
settings
.
AUTH_USER_MODEL
,
),
),
),
),
(
(
...
...
counter/migrations/0009_eticket.py
View file @
f7548ab8
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
from
__future__
import
unicode_literals
from
__future__
import
unicode_literals
from
django.db
import
migrations
,
models
from
django.db
import
migrations
,
models
import
django.db.models.deletion
class
Migration
(
migrations
.
Migration
):
class
Migration
(
migrations
.
Migration
):
...
@@ -32,6 +33,7 @@ class Migration(migrations.Migration):
...
@@ -32,6 +33,7 @@ class Migration(migrations.Migration):
(
(
"product"
,
"product"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
verbose_name
=
"product"
,
verbose_name
=
"product"
,
related_name
=
"eticket"
,
related_name
=
"eticket"
,
to
=
"counter.Product"
,
to
=
"counter.Product"
,
...
...
forum/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -232,7 +232,9 @@ class Migration(migrations.Migration):
...
@@ -232,7 +232,9 @@ class Migration(migrations.Migration):
(
(
"user"
,
"user"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
to
=
settings
.
AUTH_USER_MODEL
,
related_name
=
"_forum_infos"
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
settings
.
AUTH_USER_MODEL
,
related_name
=
"_forum_infos"
,
),
),
),
),
],
],
...
...
launderette/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -26,6 +26,7 @@ class Migration(migrations.Migration):
...
@@ -26,6 +26,7 @@ class Migration(migrations.Migration):
(
(
"counter"
,
"counter"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
related_name
=
"launderette"
,
related_name
=
"launderette"
,
verbose_name
=
"counter"
,
verbose_name
=
"counter"
,
to
=
"counter.Counter"
,
to
=
"counter.Counter"
,
...
...
stock/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -86,6 +86,7 @@ class Migration(migrations.Migration):
...
@@ -86,6 +86,7 @@ class Migration(migrations.Migration):
(
(
"counter"
,
"counter"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
verbose_name
=
"counter"
,
verbose_name
=
"counter"
,
related_name
=
"stock"
,
related_name
=
"stock"
,
to
=
"counter.Counter"
,
to
=
"counter.Counter"
,
...
...
trombi/migrations/0001_initial.py
View file @
f7548ab8
...
@@ -51,7 +51,14 @@ class Migration(migrations.Migration):
...
@@ -51,7 +51,14 @@ class Migration(migrations.Migration):
verbose_name
=
"maximum characters"
,
verbose_name
=
"maximum characters"
,
),
),
),
),
(
"club"
,
models
.
OneToOneField
(
to
=
"club.Club"
,
related_name
=
"trombi"
)),
(
"club"
,
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
to
=
"club.Club"
,
related_name
=
"trombi"
,
),
),
],
],
),
),
migrations
.
CreateModel
(
migrations
.
CreateModel
(
...
@@ -115,6 +122,7 @@ class Migration(migrations.Migration):
...
@@ -115,6 +122,7 @@ class Migration(migrations.Migration):
(
(
"user"
,
"user"
,
models
.
OneToOneField
(
models
.
OneToOneField
(
on_delete
=
django
.
db
.
models
.
deletion
.
CASCADE
,
verbose_name
=
"trombi user"
,
verbose_name
=
"trombi user"
,
to
=
settings
.
AUTH_USER_MODEL
,
to
=
settings
.
AUTH_USER_MODEL
,
related_name
=
"trombi_user"
,
related_name
=
"trombi_user"
,
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment