Revision 2872
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1010 | 1010 |
|
1011 | 1011 |
if has_pkey: |
1012 | 1012 |
cols[0] = pkey = copy.copy(cols[0]) # don't modify input! |
1013 |
pkey.type += ' NOT NULL PRIMARY KEY' |
|
1013 |
pkey.nullable = False |
|
1014 |
pkey.constraints = 'PRIMARY KEY' |
|
1014 | 1015 |
|
1015 | 1016 |
str_ = 'CREATE TABLE '+table.to_str(db)+' (\n' |
1016 | 1017 |
str_ += '\n, '.join(v.to_str(db) for v in cols) |
Also available in: Unified diff
sql.py: create_table(): has_pkey: Use new TypedCol.constraints to store 'PRIMARY KEY'