mirror of
https://github.com/GSA/notifications-api.git
synced 2026-09-11 10:28:55 -04:00
more
This commit is contained in:
@@ -15,17 +15,11 @@ import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
def upgrade():
|
||||
op.create_table('provider_rates',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('valid_from', sa.DateTime(), nullable=False),
|
||||
sa.Column('provider', sa.Enum('mmg', 'twilio', 'firetext', 'ses', 'sns', name='providers'), nullable=False),
|
||||
sa.Column('rate', sa.Numeric(), nullable=False),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
|
||||
op.create_table('provider_statistics',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('day', sa.Date(), nullable=False),
|
||||
sa.Column('provider', sa.Enum('mmg', 'twilio', 'firetext', 'ses', 'sns', name='providers'), nullable=False),
|
||||
sa.Column('provider', sa.Enum('ses', 'sns', name='providers'), nullable=False),
|
||||
sa.Column('service_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('unit_count', sa.BigInteger(), nullable=False),
|
||||
sa.ForeignKeyConstraint(['service_id'], ['services.id'], ),
|
||||
@@ -37,4 +31,3 @@ def upgrade():
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_provider_statistics_service_id'), table_name='provider_statistics')
|
||||
op.drop_table('provider_statistics')
|
||||
op.drop_table('provider_rates')
|
||||
|
||||
Reference in New Issue
Block a user