Revision 4443
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
1164 | 1164 |
run_query(db, 'ALTER TABLE '+table.to_str(db)+' ALTER COLUMN ' |
1165 | 1165 |
+col.to_str(db)+' SET NOT NULL', cacheable=True, log_level=3) |
1166 | 1166 |
|
1167 |
def drop_not_null(db, col): |
|
1168 |
table = col.table |
|
1169 |
col = sql_gen.to_name_only_col(col) |
|
1170 |
run_query(db, 'ALTER TABLE '+table.to_str(db)+' ALTER COLUMN ' |
|
1171 |
+col.to_str(db)+' DROP NOT NULL', cacheable=True, log_level=3) |
|
1172 |
|
|
1167 | 1173 |
row_num_col = '_row_num' |
1168 | 1174 |
|
1169 | 1175 |
row_num_typed_col = sql_gen.TypedCol(row_num_col, 'serial', nullable=False, |
Also available in: Unified diff
sql.py: Added drop_not_null()