plain.models 0.34.1__tar.gz → 0.34.3__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.34.1 → plain_models-0.34.3}/PKG-INFO +1 -1
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/CHANGELOG.md +21 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/creation.py +3 -20
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/schema.py +2 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/base.py +0 -1
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/schema.py +2 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/creation.py +1 -3
- {plain_models-0.34.1 → plain_models-0.34.3}/pyproject.toml +1 -1
- {plain_models-0.34.1 → plain_models-0.34.3}/.gitignore +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/LICENSE +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/README.md +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/README.md +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/aggregates.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/base.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/client.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/features.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/introspection.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/operations.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/base/validation.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/ddl_references.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/base.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/client.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/compiler.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/creation.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/features.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/introspection.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/operations.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/schema.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/mysql/validation.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/client.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/creation.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/features.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/introspection.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/postgresql/operations.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/_functions.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/base.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/client.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/features.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/introspection.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/operations.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/sqlite3/schema.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backends/utils.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backups/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backups/cli.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backups/clients.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/backups/core.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/base.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/cli.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/config.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/connections.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/constants.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/constraints.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/database_url.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/db.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/default_settings.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/deletion.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/entrypoints.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/enums.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/exceptions.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/expressions.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/json.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/mixins.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/related.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/related_descriptors.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/related_lookups.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/fields/reverse_related.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/forms.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/comparison.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/datetime.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/math.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/mixins.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/text.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/functions/window.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/indexes.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/lookups.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/manager.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/autodetector.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/exceptions.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/executor.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/graph.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/loader.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/migration.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/operations/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/operations/base.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/operations/fields.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/operations/models.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/operations/special.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/optimizer.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/questioner.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/recorder.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/serializer.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/state.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/utils.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/migrations/writer.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/options.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/preflight.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/query.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/query_utils.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/registry.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/compiler.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/constants.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/datastructures.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/query.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/subqueries.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/sql/where.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/test/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/test/pytest.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/test/utils.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/transaction.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/plain/models/utils.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/examples/migrations/0001_initial.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/examples/migrations/0002_test_field_removed.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/examples/migrations/__init__.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/examples/models.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/settings.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/app/urls.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/test_database_url.py +0 -0
- {plain_models-0.34.1 → plain_models-0.34.3}/tests/test_models.py +0 -0
@@ -1,5 +1,26 @@
|
|
1
1
|
# plain-models changelog
|
2
2
|
|
3
|
+
## [0.34.3](https://github.com/dropseed/plain/releases/plain-models@0.34.3) (2025-06-29)
|
4
|
+
|
5
|
+
### What's changed
|
6
|
+
|
7
|
+
- Simplified log output when creating or destroying test databases during test setup. The messages now display the test database name directly and no longer reference the deprecated "alias" terminology ([a543706](https://github.com/dropseed/plain/commit/a543706)).
|
8
|
+
|
9
|
+
### Upgrade instructions
|
10
|
+
|
11
|
+
- No changes required
|
12
|
+
|
13
|
+
## [0.34.2](https://github.com/dropseed/plain/releases/plain-models@0.34.2) (2025-06-27)
|
14
|
+
|
15
|
+
### What's changed
|
16
|
+
|
17
|
+
- Fixed PostgreSQL `_nodb_cursor` fallback that could raise `TypeError: __init__() got an unexpected keyword argument 'alias'` when the maintenance database wasn't available ([3e49683](https://github.com/dropseed/plain/commit/3e49683)).
|
18
|
+
- Restored support for the `USING` clause when creating PostgreSQL indexes; custom index types such as `GIN` and `GIST` are now generated correctly again ([9d2b8fe](https://github.com/dropseed/plain/commit/9d2b8fe)).
|
19
|
+
|
20
|
+
### Upgrade instructions
|
21
|
+
|
22
|
+
- No changes required
|
23
|
+
|
3
24
|
## [0.34.1](https://github.com/dropseed/plain/releases/plain-models@0.34.1) (2025-06-23)
|
4
25
|
|
5
26
|
### What's changed
|
@@ -36,9 +36,7 @@ class BaseDatabaseCreation:
|
|
36
36
|
test_database_name = self._get_test_db_name(prefix)
|
37
37
|
|
38
38
|
if verbosity >= 1:
|
39
|
-
self.log(
|
40
|
-
f"Creating test database for alias {self._get_database_display_str(verbosity, test_database_name)}..."
|
41
|
-
)
|
39
|
+
self.log(f"Creating test database '{test_database_name}'...")
|
42
40
|
|
43
41
|
self._create_test_db(
|
44
42
|
test_database_name=test_database_name, verbosity=verbosity, autoclobber=True
|
@@ -127,15 +125,6 @@ class BaseDatabaseCreation:
|
|
127
125
|
# # because constraint checks were disabled.
|
128
126
|
# self.connection.check_constraints(table_names=table_names)
|
129
127
|
|
130
|
-
def _get_database_display_str(self, verbosity, database_name):
|
131
|
-
"""
|
132
|
-
Return display string for a database for use in various actions.
|
133
|
-
"""
|
134
|
-
return "'{}'{}".format(
|
135
|
-
self.connection.alias,
|
136
|
-
(f" ('{database_name}')") if verbosity >= 2 else "",
|
137
|
-
)
|
138
|
-
|
139
128
|
def _get_test_db_name(self, prefix=""):
|
140
129
|
"""
|
141
130
|
Internal implementation - return the name of the test DB that will be
|
@@ -182,11 +171,7 @@ class BaseDatabaseCreation:
|
|
182
171
|
try:
|
183
172
|
if verbosity >= 1:
|
184
173
|
self.log(
|
185
|
-
"Destroying old test database
|
186
|
-
self._get_database_display_str(
|
187
|
-
verbosity, test_database_name
|
188
|
-
),
|
189
|
-
)
|
174
|
+
f"Destroying old test database '{test_database_name}'..."
|
190
175
|
)
|
191
176
|
cursor.execute(
|
192
177
|
"DROP DATABASE {dbname}".format(**test_db_params)
|
@@ -211,9 +196,7 @@ class BaseDatabaseCreation:
|
|
211
196
|
test_database_name = self.connection.settings_dict["NAME"]
|
212
197
|
|
213
198
|
if verbosity >= 1:
|
214
|
-
self.log(
|
215
|
-
f"Destroying test database for alias {self._get_database_display_str(verbosity, test_database_name)}..."
|
216
|
-
)
|
199
|
+
self.log(f"Destroying test database '{test_database_name}'...")
|
217
200
|
self._destroy_test_db(test_database_name, verbosity)
|
218
201
|
|
219
202
|
# Restore the original database name
|
@@ -1247,6 +1247,7 @@ class BaseDatabaseSchemaEditor:
|
|
1247
1247
|
fields=None,
|
1248
1248
|
name=None,
|
1249
1249
|
suffix="",
|
1250
|
+
using="",
|
1250
1251
|
col_suffixes=(),
|
1251
1252
|
sql=None,
|
1252
1253
|
opclasses=(),
|
@@ -1276,6 +1277,7 @@ class BaseDatabaseSchemaEditor:
|
|
1276
1277
|
sql_create_index,
|
1277
1278
|
table=Table(table, self.quote_name),
|
1278
1279
|
name=IndexName(table, columns, suffix, create_index_name),
|
1280
|
+
using=using,
|
1279
1281
|
columns=(
|
1280
1282
|
self._index_columns(table, columns, col_suffixes, opclasses)
|
1281
1283
|
if columns
|
@@ -329,6 +329,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
|
329
329
|
fields=None,
|
330
330
|
name=None,
|
331
331
|
suffix="",
|
332
|
+
using="",
|
332
333
|
col_suffixes=(),
|
333
334
|
sql=None,
|
334
335
|
opclasses=(),
|
@@ -347,6 +348,7 @@ class DatabaseSchemaEditor(BaseDatabaseSchemaEditor):
|
|
347
348
|
fields=fields,
|
348
349
|
name=name,
|
349
350
|
suffix=suffix,
|
351
|
+
using=using,
|
350
352
|
col_suffixes=col_suffixes,
|
351
353
|
sql=sql,
|
352
354
|
opclasses=opclasses,
|
@@ -32,9 +32,7 @@ class DatabaseCreation(BaseDatabaseCreation):
|
|
32
32
|
if not self.is_in_memory_db(test_database_name):
|
33
33
|
# Erase the old test database file.
|
34
34
|
if verbosity >= 1:
|
35
|
-
self.log(
|
36
|
-
f"Destroying old test database for alias {self._get_database_display_str(verbosity, test_database_name)}..."
|
37
|
-
)
|
35
|
+
self.log(f"Destroying old test database '{test_database_name}'...")
|
38
36
|
if os.access(test_database_name, os.F_OK):
|
39
37
|
if not autoclobber:
|
40
38
|
confirm = input(
|
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.34.1 → plain_models-0.34.3}/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
|
File without changes
|
{plain_models-0.34.1 → plain_models-0.34.3}/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
|