parent
81ebc2cb5f
commit
14ea755a51
@ -0,0 +1,38 @@
|
||||
"""Cast resolution as float
|
||||
|
||||
Revision ID: 15b3c7a8e804
|
||||
Revises: 4968a333a100
|
||||
Create Date: 2022-10-31 23:55:04.806055
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = "15b3c7a8e804"
|
||||
down_revision = "4968a333a100"
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands MANUALLY composed for Alembic ###
|
||||
op.execute(
|
||||
sa.text(
|
||||
"ALTER TABLE geodata ALTER COLUMN resolution TYPE FLOAT USING resolution::double precision"
|
||||
)
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic ###
|
||||
op.alter_column(
|
||||
"geodata",
|
||||
"resolution",
|
||||
existing_type=sa.Float(),
|
||||
type_=sa.VARCHAR(),
|
||||
existing_nullable=True,
|
||||
)
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Reference in new issue