mirror of
https://github.com/GSA/notifications-api.git
synced 2026-02-01 07:35:34 -05:00
Merge branch 'master' into schedule-api-notification
Conflicts: app/celery/scheduled_tasks.py app/v2/notifications/post_notifications.py tests/app/celery/test_scheduled_tasks.py
This commit is contained in:
@@ -15,10 +15,10 @@ import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
def upgrade():
|
||||
# ### commands auto generated by Alembic - please adjust! ###
|
||||
service_permission_types = op.create_table('service_permission_types',
|
||||
sa.Column('name', sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint('name'))
|
||||
### commands auto generated by Alembic - please adjust! ###
|
||||
service_permission_types=op.create_table('service_permission_types',
|
||||
sa.Column('name', sa.String(length=255), nullable=False),
|
||||
sa.PrimaryKeyConstraint('name'))
|
||||
|
||||
op.bulk_insert(service_permission_types,
|
||||
[
|
||||
|
||||
39
migrations/versions/0084_add_job_stats.py
Normal file
39
migrations/versions/0084_add_job_stats.py
Normal file
@@ -0,0 +1,39 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0084_add_job_stats
|
||||
Revises: 0083_add_perm_types_and_svc_perm
|
||||
Create Date: 2017-05-12 13:16:14.147368
|
||||
|
||||
"""
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '0084_add_job_stats'
|
||||
down_revision = '0083_add_perm_types_and_svc_perm'
|
||||
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
def upgrade():
|
||||
op.create_table('job_statistics',
|
||||
sa.Column('id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('job_id', postgresql.UUID(as_uuid=True), nullable=False),
|
||||
sa.Column('emails_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('emails_delivered', sa.BigInteger(), nullable=False),
|
||||
sa.Column('emails_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_delivered', sa.BigInteger(), nullable=False),
|
||||
sa.Column('sms_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('letters_sent', sa.BigInteger(), nullable=False),
|
||||
sa.Column('letters_failed', sa.BigInteger(), nullable=False),
|
||||
sa.Column('created_at', sa.DateTime(), nullable=True),
|
||||
sa.Column('updated_at', sa.DateTime(), nullable=True),
|
||||
sa.ForeignKeyConstraint(['job_id'], ['jobs.id'], ),
|
||||
sa.PrimaryKeyConstraint('id')
|
||||
)
|
||||
op.create_index(op.f('ix_job_statistics_job_id'), 'job_statistics', ['job_id'], unique=True)
|
||||
|
||||
|
||||
def downgrade():
|
||||
op.drop_index(op.f('ix_job_statistics_job_id'), table_name='job_statistics')
|
||||
op.drop_table('job_statistics')
|
||||
@@ -1,7 +1,7 @@
|
||||
"""empty message
|
||||
|
||||
Revision ID: 0084_scheduled_notifications
|
||||
Revises: 0083_add_perm_types_and_svc_perm
|
||||
Revision ID: 0085_scheduled_notifications
|
||||
Revises: 0084_add_job_stats
|
||||
Create Date: 2017-05-15 12:50:20.041950
|
||||
|
||||
"""
|
||||
@@ -9,8 +9,8 @@ from alembic import op
|
||||
import sqlalchemy as sa
|
||||
from sqlalchemy.dialects import postgresql
|
||||
|
||||
revision = '0084_scheduled_notifications'
|
||||
down_revision = '0083_add_perm_types_and_svc_perm'
|
||||
revision = '0085_scheduled_notifications'
|
||||
down_revision = '0084_add_job_stats'
|
||||
|
||||
|
||||
def upgrade():
|
||||
Reference in New Issue
Block a user