You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 lines
691 B
23 lines
691 B
def migrate_up(manager):
|
|
manager.execute_script(CREATE_TABLE_SQL)
|
|
|
|
def migrate_down(manager):
|
|
manager.execute_script(DROP_TABLE_SQL)
|
|
|
|
|
|
CREATE_TABLE_SQL = """
|
|
-- test iteration attributes (key value pairs at an iteration level)
|
|
CREATE TABLE iteration_attributes (
|
|
test_idx int(10) unsigned NOT NULL, -- ref to test table
|
|
FOREIGN KEY (test_idx) REFERENCES tests(test_idx) ON DELETE CASCADE,
|
|
iteration INTEGER, -- integer
|
|
attribute VARCHAR(30), -- attribute name (e.g. 'run_id')
|
|
value VARCHAR(100), -- attribute value
|
|
KEY `test_idx` (`test_idx`)
|
|
) TYPE=InnoDB;
|
|
"""
|
|
|
|
DROP_TABLE_SQL = """
|
|
DROP TABLE iteration_attributes;
|
|
"""
|