diff --git a/migrations/versions/0454_add_template_category.py b/migrations/versions/0454_add_template_category.py index de1f631325..07d60a0383 100644 --- a/migrations/versions/0454_add_template_category.py +++ b/migrations/versions/0454_add_template_category.py @@ -14,6 +14,10 @@ revision = "0454_add_template_categories" down_revision = "0452_set_pgaudit_config" +# TODO: Add these to the config instead +DEFAULT_LOW = "0dda24c2-982a-4f44-9749-0e38b2607e89" +DEFAULT_MEDIUM = "f75d6706-21b7-437e-b93a-2c0ab771e28e" +DEFAULT_HIGH = "c4f87d7c-a55b-4c0f-91fe-e56c65bb1871" def upgrade(): op.create_table( @@ -52,12 +56,22 @@ def upgrade(): ) op.create_foreign_key("fk_template_template_categories", "templates", "template_categories", ["template_category_id"], ["id"]) - # Insert the generic Low priority (bulk) category - # op.execute(""" - # INSERT INTO template_category (id, name_en, name_fr, sms_process_type, email_process_type, hidden) - # VALUES ('00000000-0000-0000-0000-000000000000', 'Low Category (Bulk)', 'Catégorie Basse (En Vrac)', true - # """ - # ) + # Insert the generic low, medium, and high categories + op.execute(f""" + INSERT INTO template_category (id, name_en, name_fr, sms_process_type, email_process_type, hidden) + VALUES ({DEFAULT_LOW}, 'Low Category (Bulk)', 'Catégorie Basse (En Vrac)', true + """ + ) + op.execute(f""" + INSERT INTO template_category (id, name_en, name_fr, sms_process_type, email_process_type, hidden) + VALUES ({DEFAULT_MEDIUM}, 'Medium Category (Normal)', 'Catégorie Moyenne (Normale)', true + """ + ) + op.execute(f""" + INSERT INTO template_category (id, name_en, name_fr, sms_process_type, email_process_type, hidden) + VALUES ({DEFAULT_HIGH}, 'High Category (Priority)', 'Catégorie Haute (Priorité)', true + """ + ) def downgrade():