mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-29 12:24:32 +02:00
Handle changed defaults, refs #467
This commit is contained in:
parent
341f000097
commit
1ac5d4e39d
2 changed files with 16 additions and 7 deletions
|
|
@ -1204,6 +1204,13 @@ def test_create_if_no_columns(fresh_db):
|
|||
'CREATE TABLE "demo" (\n [id] INTEGER PRIMARY KEY,\n [name] TEXT NOT NULL\n)',
|
||||
True,
|
||||
),
|
||||
# Change default values
|
||||
(
|
||||
{"id": int, "name": str},
|
||||
{"pk": "id", "defaults": {"id": 0, "name": "Bob"}},
|
||||
"CREATE TABLE \"demo\" (\n [id] INTEGER PRIMARY KEY DEFAULT 0,\n [name] TEXT DEFAULT 'Bob'\n)",
|
||||
True,
|
||||
),
|
||||
),
|
||||
)
|
||||
def test_create_transform(fresh_db, cols, kwargs, expected_schema, should_transform):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue