V0.15.0 - Not done yet
This commit is contained in:
@@ -223,6 +223,33 @@ def migration_007_add_detail_end_row():
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
|
||||
def migration_008_add_page_height():
|
||||
"""Add page_height column to cons_processes table"""
|
||||
conn = get_db()
|
||||
|
||||
if table_exists('cons_processes'):
|
||||
if not column_exists('cons_processes', 'page_height'):
|
||||
conn.execute('ALTER TABLE cons_processes ADD COLUMN page_height INTEGER')
|
||||
print(" Added page_height column to cons_processes")
|
||||
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
def migration_009_add_print_columns():
|
||||
"""Add print_start_col and print_end_col to cons_processes"""
|
||||
conn = get_db()
|
||||
if table_exists('cons_processes'):
|
||||
if not column_exists('cons_processes', 'print_start_col'):
|
||||
conn.execute('ALTER TABLE cons_processes ADD COLUMN print_start_col TEXT DEFAULT "A"')
|
||||
print(" Added print_start_col")
|
||||
if not column_exists('cons_processes', 'print_end_col'):
|
||||
conn.execute('ALTER TABLE cons_processes ADD COLUMN print_end_col TEXT')
|
||||
print(" Added print_end_col")
|
||||
conn.commit()
|
||||
conn.close()
|
||||
|
||||
|
||||
# List of all migrations in order
|
||||
MIGRATIONS = [
|
||||
(1, 'add_modules_tables', migration_001_add_modules_tables),
|
||||
@@ -232,6 +259,8 @@ MIGRATIONS = [
|
||||
(5, 'add_cons_process_fields_duplicate_key', migration_005_add_cons_process_fields_duplicate_key),
|
||||
(6, 'add_is_deleted_to_locationcounts', migration_006_add_is_deleted_to_locationcounts),
|
||||
(7, 'add_detail_end_row', migration_007_add_detail_end_row),
|
||||
(8, 'add_page_height', migration_008_add_page_height),
|
||||
(9, 'add_print_columns', migration_009_add_print_columns),
|
||||
]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user