summaryrefslogtreecommitdiff
path: root/tests/migrations2
diff options
context:
space:
mode:
authorMoein Bbp <bbp.moein@yahoo.com>2024-01-17 23:45:52 +0330
committerMariusz Felisiak <felisiak.mariusz@gmail.com>2024-02-13 14:47:49 +0100
commitcf107fe255dbc4e1619c0985e4becdd9cabe8235 (patch)
tree4098f4e0b0dca449cce16a6dc3df5d57198b8084 /tests/migrations2
parent222bf2932b55ebc964ffc5f9a6f47bad083e5ac2 (diff)
Fixed #35122 -- Made migrate --prune option respect --app_label.
Diffstat (limited to 'tests/migrations2')
-rw-r--r--tests/migrations2/test_migrations_2_squashed_with_replaces/0001_squashed_0002.py30
-rw-r--r--tests/migrations2/test_migrations_2_squashed_with_replaces/__init__.py0
2 files changed, 30 insertions, 0 deletions
diff --git a/tests/migrations2/test_migrations_2_squashed_with_replaces/0001_squashed_0002.py b/tests/migrations2/test_migrations_2_squashed_with_replaces/0001_squashed_0002.py
new file mode 100644
index 0000000000..30700e5eb6
--- /dev/null
+++ b/tests/migrations2/test_migrations_2_squashed_with_replaces/0001_squashed_0002.py
@@ -0,0 +1,30 @@
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ replaces = [
+ ("migrations2", "0001_initial"),
+ ("migrations2", "0002_second"),
+ ]
+
+ operations = [
+ migrations.CreateModel(
+ "OtherAuthor",
+ [
+ ("id", models.AutoField(primary_key=True)),
+ ("name", models.CharField(max_length=255)),
+ ],
+ ),
+ migrations.CreateModel(
+ "OtherBook",
+ [
+ ("id", models.AutoField(primary_key=True)),
+ (
+ "author",
+ models.ForeignKey(
+ "migrations2.OtherAuthor", models.SET_NULL, null=True
+ ),
+ ),
+ ],
+ ),
+ ]
diff --git a/tests/migrations2/test_migrations_2_squashed_with_replaces/__init__.py b/tests/migrations2/test_migrations_2_squashed_with_replaces/__init__.py
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/tests/migrations2/test_migrations_2_squashed_with_replaces/__init__.py