Support single constraints without lists
This commit is contained in:
@@ -62,7 +62,11 @@ basic_functionality() ->
|
||||
Columns = ["id", "name", "age", "wage"],
|
||||
AllRows = [{1, <<"abby">>, 20, 2000}, {2, <<"marge">>, 30, 2000}],
|
||||
AbbyOnly = [{1, <<"abby">>, 20, 2000}],
|
||||
TableInfo = [{id, integer, [{primary_key, [asc, autoincrement]}]}, {name, text, [not_null, unique]}, {age, integer}, {wage, integer}],
|
||||
TableInfo = [{id, integer, [{primary_key, [asc, autoincrement]}]},
|
||||
{name, text, [not_null, unique]},
|
||||
{age, integer, not_null},
|
||||
{wage, integer}],
|
||||
TableInfo1 = lists:keyreplace(age, 1, TableInfo, {age, integer, [not_null]}),
|
||||
drop_all_tables(ct),
|
||||
?WARN_ERROR_MESSAGE,
|
||||
?assertEqual(
|
||||
@@ -76,7 +80,7 @@ basic_functionality() ->
|
||||
[user, sqlite_sequence],
|
||||
sqlite3:list_tables(ct)),
|
||||
?assertEqual(
|
||||
TableInfo,
|
||||
TableInfo1,
|
||||
sqlite3:table_info(ct, user)),
|
||||
?assertEqual(
|
||||
{rowid, 1},
|
||||
|
||||
Reference in New Issue
Block a user