Skip to content

Commit

Permalink
Merge pull request #187 from M3nin0/marketplace
Browse files Browse the repository at this point in the history
alembic: removing invalid code
  • Loading branch information
M3nin0 authored Feb 14, 2024
2 parents 7c19911 + ce230e7 commit ecffe5d
Showing 1 changed file with 0 additions and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -388,52 +388,12 @@ def upgrade():
),
)
op.drop_index("ix_uq_partial_files_object_is_head", table_name="files_object")
op.alter_column(
"files_objecttags",
"key",
existing_type=sa.TEXT(),
type_=sa.String(length=255),
existing_nullable=False,
)
op.alter_column(
"records_metadata_version",
"json",
existing_type=postgresql.JSON(astext_type=sa.Text()),
type_=sa.JSON()
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
.with_variant(
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
)
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
existing_nullable=True,
autoincrement=False,
)
# ### end Alembic commands ###


def downgrade():
"""Downgrade database."""
# ### commands auto generated by Alembic - please adjust! ###
op.alter_column(
"records_metadata_version",
"json",
existing_type=sa.JSON()
.with_variant(sqlalchemy_utils.types.json.JSONType(), "mysql")
.with_variant(
postgresql.JSONB(none_as_null=True, astext_type=sa.Text()), "postgresql"
)
.with_variant(sqlalchemy_utils.types.json.JSONType(), "sqlite"),
type_=postgresql.JSON(astext_type=sa.Text()),
existing_nullable=True,
autoincrement=False,
)
op.alter_column(
"files_objecttags",
"key",
existing_type=sa.String(length=255),
type_=sa.TEXT(),
existing_nullable=False,
)
op.create_index(
"ix_uq_partial_files_object_is_head",
"files_object",
Expand Down

0 comments on commit ecffe5d

Please sign in to comment.