V0.15.0 - Not done yet

This commit is contained in:
Javier
2026-02-01 16:22:59 -06:00
parent 89be88566f
commit 2a649fdbcc
8 changed files with 455 additions and 115 deletions

View File

@@ -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),
]