-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is the first deploy in series of deploys to give certain templat…
…es priority in processing. If the template is marked as priority the notification will be sent using the `notify` queue. The `notify` queue is a low volume queue, messages here will not be queue behind a large job and should be delivered with in a more consistent time frame. - Added templates.process_type and templates_history.process_type column. - Added a template_process_type table to handle the enum for templates.process_type, initial values are normal and priority https://www.pivotaltracker.com/story/show/135429147
- Loading branch information
Rebecca Law
committed
Jan 13, 2017
1 parent
d759842
commit 6c79ddb
Showing
4 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
"""empty message | ||
Revision ID: 0063_templates_process_type | ||
Revises: 0062_provider_details_history | ||
Create Date: 2017-01-10 15:39:30.909308 | ||
""" | ||
|
||
# revision identifiers, used by Alembic. | ||
revision = '0063_templates_process_type' | ||
down_revision = '0062_provider_details_history' | ||
|
||
from alembic import op | ||
import sqlalchemy as sa | ||
|
||
|
||
def upgrade(): | ||
op.create_table('template_process_type', | ||
sa.Column('name', sa.String(length=255), nullable=False), | ||
sa.PrimaryKeyConstraint('name') | ||
) | ||
op.execute("INSERT INTO template_process_type VALUES ('normal'), ('priority')") | ||
op.add_column('templates', sa.Column('process_type', sa.String(length=255), nullable=True)) | ||
op.create_index(op.f('ix_templates_process_type'), 'templates', ['process_type'], unique=False) | ||
op.create_foreign_key('templates_history_process_type_fkey', 'templates', 'template_process_type', ['process_type'], ['name']) | ||
op.add_column('templates_history', sa.Column('process_type', sa.String(length=255), nullable=True)) | ||
op.create_index(op.f('ix_templates_history_process_type'), 'templates_history', ['process_type'], unique=False) | ||
op.create_foreign_key('templates_process_type_fkey', 'templates_history', 'template_process_type', ['process_type'], ['name']) | ||
|
||
|
||
def downgrade(): | ||
op.drop_constraint('templates_history_process_type_fkey', 'templates_history', type_='foreignkey') | ||
op.drop_index(op.f('ix_templates_history_process_type'), table_name='templates_history') | ||
op.drop_column('templates_history', 'process_type') | ||
op.drop_constraint('templates_process_type_fkey', 'templates', type_='foreignkey') | ||
op.drop_index(op.f('ix_templates_process_type'), table_name='templates') | ||
op.drop_column('templates', 'process_type') | ||
op.drop_table('template_process_type') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters