mirror of
https://github.com/GSA/notifications-api.git
synced 2026-08-20 22:39:43 -04:00
reformat
This commit is contained in:
@@ -9,22 +9,30 @@ from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0349_add_ft_processing_time'
|
||||
down_revision = '0348_migrate_broadcast_settings'
|
||||
revision = "0349_add_ft_processing_time"
|
||||
down_revision = "0348_migrate_broadcast_settings"
|
||||
|
||||
|
||||
def upgrade():
|
||||
op.create_table('ft_processing_time',
|
||||
sa.Column('bst_date', sa.Date(), nullable=False),
|
||||
sa.Column('messages_total', sa.Integer(), nullable=False),
|
||||
sa.Column('messages_within_10_secs', sa.Integer(), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=False),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.PrimaryKeyConstraint('bst_date')
|
||||
)
|
||||
op.create_index(op.f('ix_ft_processing_time_bst_date'), 'ft_processing_time', ['bst_date'], unique=False)
|
||||
op.create_table(
|
||||
"ft_processing_time",
|
||||
sa.Column("bst_date", sa.Date(), nullable=False),
|
||||
sa.Column("messages_total", sa.Integer(), nullable=False),
|
||||
sa.Column("messages_within_10_secs", sa.Integer(), nullable=False),
|
||||
sa.Column("created_at", sa.DateTime(), nullable=False),
|
||||
sa.Column("updated_at", sa.DateTime(), nullable=True),
|
||||
sa.PrimaryKeyConstraint("bst_date"),
|
||||
)
|
||||
op.create_index(
|
||||
op.f("ix_ft_processing_time_bst_date"),
|
||||
"ft_processing_time",
|
||||
["bst_date"],
|
||||
unique=False,
|
||||
)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_ft_processing_time_bst_date'), table_name='ft_processing_time')
|
||||
op.drop_table('ft_processing_time')
|
||||
op.drop_index(
|
||||
op.f("ix_ft_processing_time_bst_date"), table_name="ft_processing_time"
|
||||
)
|
||||
op.drop_table("ft_processing_time")
|
||||
|
||||
Reference in New Issue
Block a user