mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-08-02 23:44:12 +02:00
str, int, bytes aliases for column types, closes #606
This commit is contained in:
parent
9286c1ba43
commit
88bd372205
5 changed files with 32 additions and 3 deletions
|
|
@ -272,13 +272,23 @@ def test_create_index_desc(db_path):
|
|||
"col_name,col_type,expected_schema",
|
||||
(
|
||||
("text", "TEXT", "CREATE TABLE [dogs] (\n [name] TEXT\n, [text] TEXT)"),
|
||||
("text", "str", "CREATE TABLE [dogs] (\n [name] TEXT\n, [text] TEXT)"),
|
||||
("text", "STR", "CREATE TABLE [dogs] (\n [name] TEXT\n, [text] TEXT)"),
|
||||
(
|
||||
"integer",
|
||||
"INTEGER",
|
||||
"CREATE TABLE [dogs] (\n [name] TEXT\n, [integer] INTEGER)",
|
||||
),
|
||||
(
|
||||
"integer",
|
||||
"int",
|
||||
"CREATE TABLE [dogs] (\n [name] TEXT\n, [integer] INTEGER)",
|
||||
),
|
||||
("float", "FLOAT", "CREATE TABLE [dogs] (\n [name] TEXT\n, [float] FLOAT)"),
|
||||
("blob", "blob", "CREATE TABLE [dogs] (\n [name] TEXT\n, [blob] BLOB)"),
|
||||
("blob", "BLOB", "CREATE TABLE [dogs] (\n [name] TEXT\n, [blob] BLOB)"),
|
||||
("blob", "bytes", "CREATE TABLE [dogs] (\n [name] TEXT\n, [blob] BLOB)"),
|
||||
("blob", "BYTES", "CREATE TABLE [dogs] (\n [name] TEXT\n, [blob] BLOB)"),
|
||||
("default", None, "CREATE TABLE [dogs] (\n [name] TEXT\n, [default] TEXT)"),
|
||||
),
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue