plain.models 0.35.0__tar.gz → 0.36.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {plain_models-0.35.0 → plain_models-0.36.0}/.gitignore +1 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/PKG-INFO +1 -1
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/CHANGELOG.md +11 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backups/cli.py +2 -4
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/cli.py +5 -114
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/questioner.py +0 -14
- {plain_models-0.35.0 → plain_models-0.36.0}/pyproject.toml +1 -1
- {plain_models-0.35.0 → plain_models-0.36.0}/LICENSE +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/README.md +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/README.md +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/aggregates.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/client.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/creation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/features.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/introspection.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/operations.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/schema.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/base/validation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/ddl_references.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/client.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/compiler.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/creation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/features.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/introspection.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/operations.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/schema.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/mysql/validation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/client.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/creation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/features.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/introspection.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/operations.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/schema.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/_functions.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/client.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/creation.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/features.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/introspection.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/operations.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/sqlite3/schema.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/utils.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backups/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backups/clients.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backups/core.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/config.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/connections.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/constants.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/constraints.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/database_url.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/db.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/default_settings.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/deletion.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/entrypoints.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/enums.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/exceptions.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/expressions.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/json.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/mixins.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/related.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/related_descriptors.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/related_lookups.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/fields/reverse_related.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/forms.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/comparison.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/datetime.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/math.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/mixins.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/text.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/functions/window.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/indexes.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/lookups.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/manager.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/autodetector.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/exceptions.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/executor.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/graph.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/loader.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/migration.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/operations/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/operations/base.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/operations/fields.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/operations/models.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/operations/special.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/optimizer.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/recorder.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/serializer.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/state.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/utils.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/migrations/writer.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/options.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/preflight.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/query.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/query_utils.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/registry.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/compiler.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/constants.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/datastructures.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/query.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/subqueries.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/sql/where.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/test/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/test/pytest.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/test/utils.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/transaction.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/plain/models/utils.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/migrations/0001_initial.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/migrations/0002_test_field_removed.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/migrations/0003_deleteparent_childsetnull_childsetdefault_and_more.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/migrations/__init__.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/models.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/settings.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/app/urls.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/test_database_url.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/test_delete_behaviors.py +0 -0
- {plain_models-0.35.0 → plain_models-0.36.0}/tests/test_models.py +0 -0
@@ -1,5 +1,16 @@
|
|
1
1
|
# plain-models changelog
|
2
2
|
|
3
|
+
## [0.36.0](https://github.com/dropseed/plain/releases/plain-models@0.36.0) (2025-07-18)
|
4
|
+
|
5
|
+
### What's changed
|
6
|
+
|
7
|
+
- Removed the `--merge` option from the `makemigrations` command ([d366663](https://github.com/dropseed/plain/commit/d366663))
|
8
|
+
- Improved error handling in the `restore-backup` command using Click's error system ([88f06c5](https://github.com/dropseed/plain/commit/88f06c5))
|
9
|
+
|
10
|
+
### Upgrade instructions
|
11
|
+
|
12
|
+
- No changes required
|
13
|
+
|
3
14
|
## [0.35.0](https://github.com/dropseed/plain/releases/plain-models@0.35.0) (2025-07-07)
|
4
15
|
|
5
16
|
### What's changed
|
@@ -66,12 +66,10 @@ def restore_backup(backup_name, latest, pg_restore):
|
|
66
66
|
backups_handler = DatabaseBackups()
|
67
67
|
|
68
68
|
if backup_name and latest:
|
69
|
-
click.
|
70
|
-
exit(1)
|
69
|
+
raise click.UsageError("Only one of --latest or backup_name is allowed")
|
71
70
|
|
72
71
|
if not backup_name and not latest:
|
73
|
-
click.
|
74
|
-
exit(1)
|
72
|
+
raise click.UsageError("Backup name or --latest is required")
|
75
73
|
|
76
74
|
if not backup_name and latest:
|
77
75
|
backup_name = backups_handler.find_backups()[0].name
|
@@ -2,7 +2,6 @@ import os
|
|
2
2
|
import subprocess
|
3
3
|
import sys
|
4
4
|
import time
|
5
|
-
from itertools import takewhile
|
6
5
|
|
7
6
|
import click
|
8
7
|
|
@@ -22,12 +21,10 @@ from .migrations.migration import Migration, SettingsTuple
|
|
22
21
|
from .migrations.optimizer import MigrationOptimizer
|
23
22
|
from .migrations.questioner import (
|
24
23
|
InteractiveMigrationQuestioner,
|
25
|
-
MigrationQuestioner,
|
26
24
|
NonInteractiveMigrationQuestioner,
|
27
25
|
)
|
28
26
|
from .migrations.recorder import MigrationRecorder
|
29
27
|
from .migrations.state import ModelState, ProjectState
|
30
|
-
from .migrations.utils import get_migration_name_timestamp
|
31
28
|
from .migrations.writer import MigrationWriter
|
32
29
|
from .registry import models_registry
|
33
30
|
|
@@ -92,7 +89,7 @@ def db_wait():
|
|
92
89
|
)
|
93
90
|
time.sleep(1.5)
|
94
91
|
else:
|
95
|
-
click.secho("Database ready", fg="green")
|
92
|
+
click.secho("✔ Database ready", fg="green")
|
96
93
|
break
|
97
94
|
|
98
95
|
|
@@ -135,7 +132,6 @@ def list_models(package_labels, app_only):
|
|
135
132
|
is_flag=True,
|
136
133
|
help="Just show what migrations would be made; don't actually write them.",
|
137
134
|
)
|
138
|
-
@click.option("--merge", is_flag=True, help="Enable fixing of migration conflicts.")
|
139
135
|
@click.option("--empty", is_flag=True, help="Create an empty migration.")
|
140
136
|
@click.option(
|
141
137
|
"--noinput",
|
@@ -157,9 +153,7 @@ def list_models(package_labels, app_only):
|
|
157
153
|
default=1,
|
158
154
|
help="Verbosity level; 0=minimal output, 1=normal output, 2=verbose output, 3=very verbose output",
|
159
155
|
)
|
160
|
-
def makemigrations(
|
161
|
-
package_labels, dry_run, merge, empty, no_input, name, check, verbosity
|
162
|
-
):
|
156
|
+
def makemigrations(package_labels, dry_run, empty, no_input, name, check, verbosity):
|
163
157
|
"""Creates new migration(s) for packages."""
|
164
158
|
|
165
159
|
written_files = []
|
@@ -226,103 +220,6 @@ def makemigrations(
|
|
226
220
|
)
|
227
221
|
log(writer.as_string(), level=3)
|
228
222
|
|
229
|
-
def handle_merge(loader, conflicts):
|
230
|
-
"""Handle merging conflicting migrations."""
|
231
|
-
if interactive:
|
232
|
-
questioner = InteractiveMigrationQuestioner()
|
233
|
-
else:
|
234
|
-
questioner = MigrationQuestioner(defaults={"ask_merge": True})
|
235
|
-
|
236
|
-
for package_label, migration_names in conflicts.items():
|
237
|
-
log(click.style(f"Merging {package_label}", fg="cyan", bold=True), level=1)
|
238
|
-
|
239
|
-
merge_migrations = []
|
240
|
-
for migration_name in migration_names:
|
241
|
-
migration = loader.get_migration(package_label, migration_name)
|
242
|
-
migration.ancestry = [
|
243
|
-
mig
|
244
|
-
for mig in loader.graph.forwards_plan(
|
245
|
-
(package_label, migration_name)
|
246
|
-
)
|
247
|
-
if mig[0] == migration.package_label
|
248
|
-
]
|
249
|
-
merge_migrations.append(migration)
|
250
|
-
|
251
|
-
def all_items_equal(seq):
|
252
|
-
return all(item == seq[0] for item in seq[1:])
|
253
|
-
|
254
|
-
merge_migrations_generations = zip(*(m.ancestry for m in merge_migrations))
|
255
|
-
common_ancestor_count = sum(
|
256
|
-
1 for _ in takewhile(all_items_equal, merge_migrations_generations)
|
257
|
-
)
|
258
|
-
if not common_ancestor_count:
|
259
|
-
raise ValueError(f"Could not find common ancestor of {migration_names}")
|
260
|
-
|
261
|
-
for migration in merge_migrations:
|
262
|
-
migration.branch = migration.ancestry[common_ancestor_count:]
|
263
|
-
migrations_ops = (
|
264
|
-
loader.get_migration(node_package, node_name).operations
|
265
|
-
for node_package, node_name in migration.branch
|
266
|
-
)
|
267
|
-
migration.merged_operations = sum(migrations_ops, [])
|
268
|
-
|
269
|
-
for migration in merge_migrations:
|
270
|
-
log(click.style(f" Branch {migration.name}", fg="yellow"), level=1)
|
271
|
-
for operation in migration.merged_operations:
|
272
|
-
log(f" - {operation.describe()}", level=1)
|
273
|
-
|
274
|
-
if questioner.ask_merge(package_label):
|
275
|
-
numbers = [
|
276
|
-
MigrationAutodetector.parse_number(migration.name)
|
277
|
-
for migration in merge_migrations
|
278
|
-
]
|
279
|
-
biggest_number = (
|
280
|
-
max(x for x in numbers if x is not None) if numbers else 0
|
281
|
-
)
|
282
|
-
|
283
|
-
subclass = type(
|
284
|
-
"Migration",
|
285
|
-
(Migration,),
|
286
|
-
{
|
287
|
-
"dependencies": [
|
288
|
-
(package_label, migration.name)
|
289
|
-
for migration in merge_migrations
|
290
|
-
],
|
291
|
-
},
|
292
|
-
)
|
293
|
-
|
294
|
-
parts = [f"{biggest_number + 1:04d}"]
|
295
|
-
if migration_name:
|
296
|
-
parts.append(migration_name)
|
297
|
-
else:
|
298
|
-
parts.append("merge")
|
299
|
-
leaf_names = "_".join(
|
300
|
-
sorted(migration.name for migration in merge_migrations)
|
301
|
-
)
|
302
|
-
if len(leaf_names) > 47:
|
303
|
-
parts.append(get_migration_name_timestamp())
|
304
|
-
else:
|
305
|
-
parts.append(leaf_names)
|
306
|
-
|
307
|
-
new_migration_name = "_".join(parts)
|
308
|
-
new_migration = subclass(new_migration_name, package_label)
|
309
|
-
writer = MigrationWriter(new_migration)
|
310
|
-
|
311
|
-
if not dry_run:
|
312
|
-
with open(writer.path, "w", encoding="utf-8") as fh:
|
313
|
-
fh.write(writer.as_string())
|
314
|
-
log(f"\nCreated new merge migration {writer.path}", level=1)
|
315
|
-
elif verbosity == 3:
|
316
|
-
log(
|
317
|
-
click.style(
|
318
|
-
f"Full merge migrations file '{writer.filename}':",
|
319
|
-
fg="cyan",
|
320
|
-
bold=True,
|
321
|
-
),
|
322
|
-
level=3,
|
323
|
-
)
|
324
|
-
log(writer.as_string(), level=3)
|
325
|
-
|
326
223
|
# Validate package labels
|
327
224
|
package_labels = set(package_labels)
|
328
225
|
has_bad_labels = False
|
@@ -351,21 +248,16 @@ def makemigrations(
|
|
351
248
|
if package_label in package_labels
|
352
249
|
}
|
353
250
|
|
354
|
-
if conflicts
|
251
|
+
if conflicts:
|
355
252
|
name_str = "; ".join(
|
356
253
|
"{} in {}".format(", ".join(names), package)
|
357
254
|
for package, names in conflicts.items()
|
358
255
|
)
|
359
256
|
raise click.ClickException(
|
360
257
|
f"Conflicting migrations detected; multiple leaf nodes in the "
|
361
|
-
f"migration graph: ({name_str})
|
362
|
-
f"'python manage.py makemigrations --merge'"
|
258
|
+
f"migration graph: ({name_str})."
|
363
259
|
)
|
364
260
|
|
365
|
-
# Handle merge if requested
|
366
|
-
if merge and conflicts:
|
367
|
-
return handle_merge(loader, conflicts)
|
368
|
-
|
369
261
|
# Set up questioner
|
370
262
|
if interactive:
|
371
263
|
questioner = InteractiveMigrationQuestioner(
|
@@ -533,8 +425,7 @@ def migrate(
|
|
533
425
|
)
|
534
426
|
raise click.ClickException(
|
535
427
|
"Conflicting migrations detected; multiple leaf nodes in the "
|
536
|
-
f"migration graph: ({name_str})
|
537
|
-
"'python manage.py makemigrations --merge'"
|
428
|
+
f"migration graph: ({name_str})."
|
538
429
|
)
|
539
430
|
|
540
431
|
# If they supplied command line arguments, work out what they mean.
|
@@ -74,10 +74,6 @@ class MigrationQuestioner:
|
|
74
74
|
"""Was this model really renamed?"""
|
75
75
|
return self.defaults.get("ask_rename_model", False)
|
76
76
|
|
77
|
-
def ask_merge(self, package_label):
|
78
|
-
"""Should these migrations really be merged?"""
|
79
|
-
return self.defaults.get("ask_merge", False)
|
80
|
-
|
81
77
|
def ask_auto_now_add_addition(self, field_name, model_name):
|
82
78
|
"""Adding an auto_now_add field to a model."""
|
83
79
|
# None means quit
|
@@ -227,16 +223,6 @@ class InteractiveMigrationQuestioner(MigrationQuestioner):
|
|
227
223
|
default=False,
|
228
224
|
)
|
229
225
|
|
230
|
-
def ask_merge(self, package_label):
|
231
|
-
return self._boolean_input(
|
232
|
-
(
|
233
|
-
"\nMerging will only work if the operations printed above do not conflict\n"
|
234
|
-
"with each other (working on different fields or models)\n"
|
235
|
-
"Should these migration branches be merged?"
|
236
|
-
),
|
237
|
-
default=False,
|
238
|
-
)
|
239
|
-
|
240
226
|
def ask_auto_now_add_addition(self, field_name, model_name):
|
241
227
|
"""Adding an auto_now_add field to a model."""
|
242
228
|
if not self.dry_run:
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{plain_models-0.35.0 → plain_models-0.36.0}/plain/models/backends/postgresql/introspection.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{plain_models-0.35.0 → plain_models-0.36.0}/tests/app/examples/migrations/0002_test_field_removed.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|