35 lines
1.1 KiB
Python
35 lines
1.1 KiB
Python
"""add_notification_recipients
|
|
|
|
Revision ID: 404bb5bb3a0e
|
|
Revises: 432c5287256d
|
|
Create Date: 2019-05-10 15:25:22.627996
|
|
|
|
"""
|
|
from alembic import op
|
|
import sqlalchemy as sa
|
|
from sqlalchemy.dialects import postgresql
|
|
|
|
# revision identifiers, used by Alembic.
|
|
revision = '404bb5bb3a0e'
|
|
down_revision = '432c5287256d'
|
|
branch_labels = None
|
|
depends_on = None
|
|
|
|
|
|
def upgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.create_table('notification_recipients',
|
|
sa.Column('time_created', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
|
|
sa.Column('time_updated', sa.TIMESTAMP(timezone=True), server_default=sa.text('now()'), nullable=False),
|
|
sa.Column('id', postgresql.UUID(as_uuid=True), server_default=sa.text('uuid_generate_v4()'), nullable=False),
|
|
sa.Column('email', sa.String(), nullable=False),
|
|
sa.PrimaryKeyConstraint('id')
|
|
)
|
|
# ### end Alembic commands ###
|
|
|
|
|
|
def downgrade():
|
|
# ### commands auto generated by Alembic - please adjust! ###
|
|
op.drop_table('notification_recipients')
|
|
# ### end Alembic commands ###
|