1def migrate_up(manager): 2 manager.execute_script(ADD_TABLE_QUERY_HISTORY) 3 4 5def migrate_down(manager): 6 manager.execute_script(DROP_TABLE_QUERY_HISTORY) 7 8 9ADD_TABLE_QUERY_HISTORY = """ 10CREATE TABLE IF NOT EXISTS query_history 11(uid VARCHAR(32), time_created VARCHAR(32), user_comment VARCHAR(256), 12url VARCHAR(1000)); 13""" 14 15DROP_TABLE_QUERY_HISTORY = """ 16DROP TABLE query_history; 17""" 18