Add migration for LOA array type
This commit is contained in:
28
alembic/versions/db161adbafdf_update_loa_to_array_type.py
Normal file
28
alembic/versions/db161adbafdf_update_loa_to_array_type.py
Normal file
@@ -0,0 +1,28 @@
|
||||
"""Update LOA to Array Type
|
||||
|
||||
Revision ID: db161adbafdf
|
||||
Revises: b3a1a07cf30b
|
||||
Create Date: 2019-02-15 14:28:33.181136
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = 'db161adbafdf'
|
||||
down_revision = 'b3a1a07cf30b'
|
||||
branch_labels = None
|
||||
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]")
|
||||
# ### 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]")
|
||||
# ### end Alembic commands ###
|
Reference in New Issue
Block a user