Update migration order and change loa to loas

This commit is contained in:
leigh-mil
2019-02-22 12:01:17 -05:00
parent 68ab32d1d1
commit f1b9bf19a7
6 changed files with 13 additions and 11 deletions

View File

@@ -1,7 +1,7 @@
"""Update LOA to Array Type
Revision ID: db161adbafdf
Revises: b3a1a07cf30b
Revises: fa3ba4049218
Create Date: 2019-02-15 14:28:33.181136
"""
@@ -11,7 +11,7 @@ import sqlalchemy as sa
# revision identifiers, used by Alembic.
revision = 'db161adbafdf'
down_revision = 'b3a1a07cf30b'
down_revision = 'fa3ba4049218'
branch_labels = None
depends_on = None
@@ -19,10 +19,12 @@ depends_on = None
def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute("ALTER TABLE task_orders ALTER COLUMN loa TYPE varchar[] USING array[loa]")
op.alter_column('task_orders', 'loa', new_column_name='loas')
# ### end Alembic commands ###
def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.execute("ALTER TABLE task_orders ALTER COLUMN loa TYPE varchar USING loa[1]")
op.alter_column('task_orders', 'loas', new_column_name='loa')
# ### end Alembic commands ###