dbconform 0.2.4__tar.gz → 0.2.5__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.
- {dbconform-0.2.4/src/dbconform.egg-info → dbconform-0.2.5}/PKG-INFO +16 -1
- {dbconform-0.2.4 → dbconform-0.2.5}/README.md +15 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/pyproject.toml +2 -2
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/plan/builder.py +10 -1
- {dbconform-0.2.4 → dbconform-0.2.5/src/dbconform.egg-info}/PKG-INFO +16 -1
- {dbconform-0.2.4 → dbconform-0.2.5}/LICENSE +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/setup.cfg +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/adapters/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/adapters/model_schema.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/adapters/sa_to_neutral.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/cli.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/compare/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/compare/db_schema.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/compare/diff.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/conform.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/errors.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/internal/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/internal/objects.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/internal/types.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/plan/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/plan/steps.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/db_schema.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/diff.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/model_schema.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/objects.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/schema/sa_to_neutral.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/sql_dialect/__init__.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/sql_dialect/base.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/sql_dialect/postgresql.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/sql_dialect/sqlite.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform/sql_dialect/sqlite_rebuild.py +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform.egg-info/SOURCES.txt +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform.egg-info/dependency_links.txt +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform.egg-info/entry_points.txt +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform.egg-info/requires.txt +0 -0
- {dbconform-0.2.4 → dbconform-0.2.5}/src/dbconform.egg-info/top_level.txt +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbconform
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Synchronize database schema to models — document-driven project.
|
|
5
5
|
Author: Brian L. Pond
|
|
6
6
|
License: MIT
|
|
@@ -144,6 +144,21 @@ else:
|
|
|
144
144
|
print(result.sql()) # Full DDL script
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
+
**View a human-readable summary:**
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
result.print_summary()
|
|
151
|
+
# Output:
|
|
152
|
+
# ConformPlan: 2 steps, 0 extra tables, 1 skipped steps
|
|
153
|
+
# Steps:
|
|
154
|
+
# - Add column price to product
|
|
155
|
+
# - Create table cart
|
|
156
|
+
# Skipped steps:
|
|
157
|
+
# - Drop column legacy_field from product (reason: Column drop blocked: allow_drop_extra_columns=False)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The summary shows planned steps, extra tables (in DB but not in models), and skipped steps (drift that requires opt-in to fix).
|
|
161
|
+
|
|
147
162
|
### 3. Apply changes
|
|
148
163
|
|
|
149
164
|
```python
|
|
@@ -113,6 +113,21 @@ else:
|
|
|
113
113
|
print(result.sql()) # Full DDL script
|
|
114
114
|
```
|
|
115
115
|
|
|
116
|
+
**View a human-readable summary:**
|
|
117
|
+
|
|
118
|
+
```python
|
|
119
|
+
result.print_summary()
|
|
120
|
+
# Output:
|
|
121
|
+
# ConformPlan: 2 steps, 0 extra tables, 1 skipped steps
|
|
122
|
+
# Steps:
|
|
123
|
+
# - Add column price to product
|
|
124
|
+
# - Create table cart
|
|
125
|
+
# Skipped steps:
|
|
126
|
+
# - Drop column legacy_field from product (reason: Column drop blocked: allow_drop_extra_columns=False)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
The summary shows planned steps, extra tables (in DB but not in models), and skipped steps (drift that requires opt-in to fix).
|
|
130
|
+
|
|
116
131
|
### 3. Apply changes
|
|
117
132
|
|
|
118
133
|
```python
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "dbconform"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.5"
|
|
8
8
|
description = "Synchronize database schema to models — document-driven project."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
license = { text = "MIT" }
|
|
@@ -61,7 +61,7 @@ where = ["src"]
|
|
|
61
61
|
dbconform = "dbconform.cli:main"
|
|
62
62
|
|
|
63
63
|
[tool.commitizen]
|
|
64
|
-
version = "0.2.
|
|
64
|
+
version = "0.2.5"
|
|
65
65
|
version_scheme = "semver"
|
|
66
66
|
commit = true
|
|
67
67
|
tag = true
|
|
@@ -213,11 +213,20 @@ class ConformPlanBuilder:
|
|
|
213
213
|
if drop_sql:
|
|
214
214
|
steps.append(
|
|
215
215
|
AlterTableStep(
|
|
216
|
-
description=f"Drop column {col.name} from {name}",
|
|
216
|
+
description=f"Drop column `{col.name}` from `{name}`",
|
|
217
217
|
sql=drop_sql,
|
|
218
218
|
table_name=name,
|
|
219
219
|
)
|
|
220
220
|
)
|
|
221
|
+
else:
|
|
222
|
+
for col in table_diff.removed_columns:
|
|
223
|
+
skipped_steps.append(
|
|
224
|
+
SkippedStep(
|
|
225
|
+
description=f"Drop column `{col.name}` from `{name}`",
|
|
226
|
+
reason="Column drop blocked: allow_drop_extra_columns=False",
|
|
227
|
+
table_name=name,
|
|
228
|
+
)
|
|
229
|
+
)
|
|
221
230
|
for col in table_diff.added_columns:
|
|
222
231
|
sql = self.dialect.add_column_sql(name, col)
|
|
223
232
|
steps.append(
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dbconform
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.5
|
|
4
4
|
Summary: Synchronize database schema to models — document-driven project.
|
|
5
5
|
Author: Brian L. Pond
|
|
6
6
|
License: MIT
|
|
@@ -144,6 +144,21 @@ else:
|
|
|
144
144
|
print(result.sql()) # Full DDL script
|
|
145
145
|
```
|
|
146
146
|
|
|
147
|
+
**View a human-readable summary:**
|
|
148
|
+
|
|
149
|
+
```python
|
|
150
|
+
result.print_summary()
|
|
151
|
+
# Output:
|
|
152
|
+
# ConformPlan: 2 steps, 0 extra tables, 1 skipped steps
|
|
153
|
+
# Steps:
|
|
154
|
+
# - Add column price to product
|
|
155
|
+
# - Create table cart
|
|
156
|
+
# Skipped steps:
|
|
157
|
+
# - Drop column legacy_field from product (reason: Column drop blocked: allow_drop_extra_columns=False)
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
The summary shows planned steps, extra tables (in DB but not in models), and skipped steps (drift that requires opt-in to fix).
|
|
161
|
+
|
|
147
162
|
### 3. Apply changes
|
|
148
163
|
|
|
149
164
|
```python
|
|
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
|