Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def upgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- op.add_column(
- 'company',
- sa.Column('verification_status', sa.String(length=128), nullable=True)
- )
- op.alter_column(
- 'company',
- 'address',
- existing_type=sa.VARCHAR(length=255),
- type_=sa.JSON(astext_type=sa.Text(), none_as_null=True),
- existing_nullable=True,
- postgresql_using='address::json' # Specify the USING clause for PostgreSQL
- )
- # ### end Alembic commands ###
- def downgrade():
- # ### commands auto generated by Alembic - please adjust! ###
- op.alter_column(
- 'company',
- 'address',
- existing_type=sa.JSON(astext_type=sa.Text(), none_as_null=True),
- type_=sa.VARCHAR(length=255),
- existing_nullable=True,
- postgresql_using='address::varchar' # Specify the USING clause for PostgreSQL
- )
- op.drop_column('company', 'verification_status')
- # ### end Alembic commands ###
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement