@@ -0,0 +1,1322 @@
+%22%22%22%0A%0ARevision ID: 0144_template_service_letter%0ARevises: 0143_remove_reply_to%0ACreate Date: 2017-11-17 15:42:16.401229%0A%0A%22%22%22%0Afrom alembic import op%0Aimport sqlalchemy as sa%0Afrom sqlalchemy.dialects import postgresql%0A%0Arevision = '0144_template_service_letter'%0Adown_revision = '0143_remove_reply_to'%0A%0A%0Adef upgrade():%0A    op.add_column('templates',%0A                  sa.Column('service_letter_contact_id', postgresql.UUID(as_uuid=True), nullable=True))%0A    op.create_foreign_key('templates_service_letter_contact_id_fkey', 'templates',%0A                          'service_letter_contacts', %5B'service_letter_contact_id'%5D, %5B'id'%5D)%0A%0A    op.add_column('templates_history',%0A                  sa.Column('service_letter_contact_id', postgresql.UUID(as_uuid=True), nullable=True))%0A    op.create_foreign_key('templates_history_service_letter_contact_id_fkey', 'templates_history',%0A                          'service_letter_contacts', %5B'service_letter_contact_id'%5D, %5B'id'%5D)%0A%0A%0Adef downgrade():%0A    op.drop_constraint('templates_service_letter_contact_id_fkey', 'templates', type_='foreignkey')%0A    op.drop_column('templates', 'service_letter_contact_id')%0A%0A    op.drop_constraint('templates_history_service_letter_contact_id_fkey', 'templates_history', type_='foreignkey')%0A    op.drop_column('templates_history', 'service_letter_contact_id')%0A

Add a migration to add template service_letter_contact_id columns