parent
6b172ebc8b
commit
20d59a61e2
@ -0,0 +1,30 @@
|
||||
"""Add separate depth fields
|
||||
|
||||
Revision ID: 4968a333a100
|
||||
Revises: b76b7f791b3b
|
||||
Create Date: 2022-10-07 01:11:10.752022
|
||||
|
||||
"""
|
||||
from alembic import op
|
||||
import sqlalchemy as sa
|
||||
|
||||
|
||||
# revision identifiers, used by Alembic.
|
||||
revision = '4968a333a100'
|
||||
down_revision = 'b76b7f791b3b'
|
||||
branch_labels = None
|
||||
depends_on = None
|
||||
|
||||
|
||||
def upgrade() -> None:
|
||||
# ### commands auto generated by Alembic ###
|
||||
op.add_column('geodata', sa.Column('depth_min', sa.Float(), sa.Computed("SPLIT_PART(depth,'-',1)", ), nullable=True))
|
||||
op.add_column('geodata', sa.Column('depth_max', sa.Float(), sa.Computed("SPLIT_PART(depth,'-',2)", ), nullable=True))
|
||||
# ### end Alembic commands ###
|
||||
|
||||
|
||||
def downgrade() -> None:
|
||||
# ### commands auto generated by Alembic ###
|
||||
op.drop_column('geodata', 'depth_max')
|
||||
op.drop_column('geodata', 'depth_min')
|
||||
# ### end Alembic commands ###
|
||||
Loading…
Reference in new issue