mirror of
https://github.com/simonw/sqlite-utils.git
synced 2026-07-28 03:44:31 +02:00
sqlite-utils create-table --transform, refs #467
This commit is contained in:
parent
b09b7a5129
commit
5ef47d6c30
3 changed files with 27 additions and 4 deletions
|
|
@ -1689,10 +1689,10 @@ class Table(Queryable):
|
|||
create_table_not_null.add(key)
|
||||
elif isinstance(not_null, set):
|
||||
create_table_not_null.update((rename.get(k) or k) for k in not_null)
|
||||
elif not_null is None:
|
||||
elif not not_null:
|
||||
pass
|
||||
else:
|
||||
assert False, "not_null must be a dict or a set or None"
|
||||
assert False, "not_null must be a dict or a set or None, it was {}".format(repr(not_null))
|
||||
# defaults=
|
||||
create_table_defaults = {
|
||||
(rename.get(c.name) or c.name): c.default_value
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue