mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-09-18 14:34:24 +02:00
parent
52ea7d21f4
commit
b2078ce6a1
17 changed files with 682 additions and 609 deletions
|
|
@ -114,18 +114,18 @@ def test_lookup_with_extra_insert_parameters(fresh_db):
|
|||
columns={"make_this_integer": int},
|
||||
)
|
||||
assert species.schema == (
|
||||
"CREATE TABLE [species] (\n"
|
||||
" [renamed_id] INTEGER PRIMARY KEY,\n"
|
||||
" [this_at_front] INTEGER,\n"
|
||||
" [name] TEXT,\n"
|
||||
" [type] TEXT,\n"
|
||||
" [first_seen] TEXT,\n"
|
||||
" [make_not_null] INTEGER NOT NULL,\n"
|
||||
" [fk_to_other] INTEGER REFERENCES [other_table]([id]),\n"
|
||||
" [default_is_dog] TEXT DEFAULT 'dog',\n"
|
||||
" [extract_this] INTEGER REFERENCES [extract_this]([id]),\n"
|
||||
" [convert_to_upper] TEXT,\n"
|
||||
" [make_this_integer] INTEGER\n"
|
||||
'CREATE TABLE "species" (\n'
|
||||
' "renamed_id" INTEGER PRIMARY KEY,\n'
|
||||
' "this_at_front" INTEGER,\n'
|
||||
' "name" TEXT,\n'
|
||||
' "type" TEXT,\n'
|
||||
' "first_seen" TEXT,\n'
|
||||
' "make_not_null" INTEGER NOT NULL,\n'
|
||||
' "fk_to_other" INTEGER REFERENCES "other_table"("id"),\n'
|
||||
" \"default_is_dog\" TEXT DEFAULT 'dog',\n"
|
||||
' "extract_this" INTEGER REFERENCES "extract_this"("id"),\n'
|
||||
' "convert_to_upper" TEXT,\n'
|
||||
' "make_this_integer" INTEGER\n'
|
||||
")"
|
||||
)
|
||||
assert species.get(id) == {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue