Skip to content

Commit

Permalink
GTC-2898 Allow nullable resolution fields
Browse files Browse the repository at this point in the history
  • Loading branch information
manukala6 committed Sep 10, 2024
1 parent 786ab41 commit ba03419
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""update resolution metadata fields
Revision ID: ab98e958dc3b
Revision ID: ef3392e8e054
Revises: d767b6dd2c4c
Create Date: 2024-09-10 13:49:58.066058
Create Date: 2024-09-10 14:19:43.424752
"""
from alembic import op
Expand All @@ -11,25 +11,25 @@
from sqlalchemy.dialects import postgresql

# revision identifiers, used by Alembic.
revision = 'ab98e958dc3b'
revision = 'ef3392e8e054'
down_revision = 'd767b6dd2c4c'
branch_labels = None
depends_on = None


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('dataset_metadata', 'resolution', nullable=False, new_column_name='spatial_resolution')
op.alter_column('dataset_metadata', 'resolution', nullable=True, new_column_name='spatial_resolution')
op.add_column('dataset_metadata', sa.Column('resolution_description', sa.String(), nullable=True))
op.alter_column('version_metadata', 'resolution', nullable=False, new_column_name='spatial_resolution')
op.alter_column('version_metadata', 'resolution', nullable=True, new_column_name='spatial_resolution')
op.add_column('version_metadata', sa.Column('resolution_description', sa.String(), nullable=True))
# ### end Alembic commands ###


def downgrade():
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column('dataset_metadata', 'spatial_resolution', nullable=False, new_column_name='resolution')
op.alter_column('dataset_metadata', 'spatial_resolution', nullable=True, new_column_name='resolution')
op.drop_column('version_metadata', 'resolution_description')
op.alter_column('version_metadata', 'spatial_resolution', nullable=False, new_column_name='resolution')
op.alter_column('version_metadata', 'spatial_resolution', nullable=True, new_column_name='resolution')
op.drop_column('dataset_metadata', 'resolution_description')
# ### end Alembic commands ###

0 comments on commit ba03419

Please sign in to comment.