Revision 2889
Added by Aaron Marcuse-Kubitza over 12 years ago
lib/sql.py | ||
---|---|---|
997 | 997 |
run_query(db, 'ALTER TABLE '+table+' ADD COLUMN '+row_num_col |
998 | 998 |
+' serial NOT NULL PRIMARY KEY', log_level=3) |
999 | 999 |
|
1000 |
def drop_table(db, table): |
|
1001 |
table = sql_gen.as_Table(table) |
|
1002 |
return run_query(db, 'DROP TABLE IF EXISTS '+table.to_str(db)+' CASCADE') |
|
1003 |
|
|
1000 | 1004 |
def create_table(db, table, cols, has_pkey=True, col_indexes=True): |
1001 | 1005 |
'''Creates a table. |
1002 | 1006 |
@param cols [sql_gen.TypedCol,...] The column names and types |
Also available in: Unified diff
sql.py: Added drop_table()