mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-16 02:02:13 -05:00
Reanmed the link table to be a bteer description of what the table is for as it was previously confusing. Updated the migration script to reflect those changes
This commit is contained in:
@@ -1416,8 +1416,8 @@ class ServiceLetterContact(db.Model):
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
class NotificationSmsSender(db.Model):
|
class NotificationEmailReplyTo(db.Model):
|
||||||
__tablename__ = "notification_to_email_sender"
|
__tablename__ = "notification_to_email_reply_to"
|
||||||
|
|
||||||
notification_id = db.Column(
|
notification_id = db.Column(
|
||||||
UUID(as_uuid=True),
|
UUID(as_uuid=True),
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
Revision ID: 0123_add_noti_to_email_sender
|
Revision ID: 0123_add_noti_to_email_reply
|
||||||
Revises: 0122_add_service_letter_contact
|
Revises: 0122_add_service_letter_contact
|
||||||
Create Date: 2017-09-27 09:42:39.412731
|
Create Date: 2017-09-27 09:42:39.412731
|
||||||
|
|
||||||
@@ -9,23 +9,23 @@ from alembic import op
|
|||||||
import sqlalchemy as sa
|
import sqlalchemy as sa
|
||||||
from sqlalchemy.dialects import postgresql
|
from sqlalchemy.dialects import postgresql
|
||||||
|
|
||||||
revision = '0123_add_noti_to_email_sender'
|
revision = '0123_add_noti_to_email_reply'
|
||||||
down_revision = '0122_add_service_letter_contact'
|
down_revision = '0122_add_service_letter_contact'
|
||||||
|
|
||||||
|
|
||||||
def upgrade():
|
def upgrade():
|
||||||
op.create_table('notification_to_email_sender',
|
op.create_table('notification_to_email_reply_to',
|
||||||
sa.Column('notification_id', postgresql.UUID(as_uuid=True), nullable=False),
|
sa.Column('notification_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||||
sa.Column('service_email_reply_to_id', postgresql.UUID(as_uuid=True), nullable=False),
|
sa.Column('service_email_reply_to_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||||
sa.ForeignKeyConstraint(['notification_id'], ['notifications.id'], ),
|
sa.ForeignKeyConstraint(['notification_id'], ['notifications.id'], ),
|
||||||
sa.ForeignKeyConstraint(['service_email_reply_to_id'], ['service_email_reply_to.id'], ),
|
sa.ForeignKeyConstraint(['service_email_reply_to_id'], ['service_email_reply_to.id'], ),
|
||||||
sa.PrimaryKeyConstraint('notification_id', 'service_email_reply_to_id')
|
sa.PrimaryKeyConstraint('notification_id', 'service_email_reply_to_id')
|
||||||
)
|
)
|
||||||
op.create_index(op.f('ix_notification_to_email_sender_notification_id'), 'notification_to_email_sender', ['notification_id'], unique=False)
|
op.create_index(op.f('ix_notification_to_email_sender_notification_id'), 'notification_to_email_reply_to', ['notification_id'], unique=False)
|
||||||
op.create_index(op.f('ix_notification_to_email_sender_service_email_reply_to_id'), 'notification_to_email_sender', ['service_email_reply_to_id'], unique=False)
|
op.create_index(op.f('ix_notification_to_email_sender_service_email_reply_to_id'), 'notification_to_email_reply_to', ['service_email_reply_to_id'], unique=False)
|
||||||
|
|
||||||
|
|
||||||
def downgrade():
|
def downgrade():
|
||||||
op.drop_index(op.f('ix_notification_to_email_sender_service_email_reply_to_id'), table_name='notification_to_email_sender')
|
op.drop_index(op.f('ix_notification_to_email_sender_service_email_reply_to_id'), table_name='notification_to_email_reply_to')
|
||||||
op.drop_index(op.f('ix_notification_to_email_sender_notification_id'), table_name='notification_to_email_sender')
|
op.drop_index(op.f('ix_notification_to_email_sender_notification_id'), table_name='notification_to_email_reply_to')
|
||||||
op.drop_table('notification_to_email_sender')
|
op.drop_table('notification_to_email_reply_to')
|
||||||
Reference in New Issue
Block a user