Source code for thoth.storages.data.alembic.versions.d0ebc816243c_drop_id_on_relation_tables

"""Drop id on relation tables

Revision ID: d0ebc816243c
Revises: af2b9e09e53e
Create Date: 2020-01-08 13:36:04.822647+00:00

"""
from alembic import op
import sqlalchemy as sa


# revision identifiers, used by Alembic.
revision = "d0ebc816243c"
down_revision = "af2b9e09e53e"
branch_labels = None
depends_on = None


[docs]def upgrade(): # ### commands auto generated by Alembic - please adjust! ### op.drop_column("advised", "id") op.drop_column("deb_pre_depends", "id") op.drop_column("deb_replaces", "id") op.drop_column("depends_on", "id") op.drop_column("detected_symbol", "id") op.drop_column("found_deb", "id") op.drop_column("found_python_file", "id") op.drop_column("found_python_interpreter", "id") op.drop_column("found_rpm", "id") op.drop_column("has_artifact", "id") op.drop_column("has_metadata_classifier", "id") op.drop_column("has_metadata_distutils", "id") op.drop_column("has_metadata_platform", "id") op.drop_column("has_metadata_project_url", "id") op.drop_column("has_metadata_provides_extra", "id") op.drop_column("has_metadata_requires_external", "id") op.drop_column("has_metadata_supported_platform", "id") op.drop_column("has_symbol", "id") op.drop_column("has_vulnerability", "id") op.drop_column("identified", "id") op.drop_column("included_file", "id") op.drop_column("investigated", "id") op.drop_column("investigated_file", "id") op.drop_column("requires_symbol", "id") op.drop_column("rpm_requires", "id") op.drop_column("solved", "id")
# ### end Alembic commands ###
[docs]def downgrade(): # ### commands auto generated by Alembic - please adjust! ### op.add_column("solved", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("rpm_requires", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("requires_symbol", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("investigated_file", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("investigated", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("included_file", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("identified", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_vulnerability", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_symbol", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_supported_platform", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_requires_external", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_provides_extra", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_project_url", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_platform", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_distutils", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_metadata_classifier", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("has_artifact", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("found_rpm", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("found_python_interpreter", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("found_python_file", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("found_deb", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("detected_symbol", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("depends_on", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("deb_replaces", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("deb_pre_depends", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False)) op.add_column("advised", sa.Column("id", sa.INTEGER(), autoincrement=True, nullable=False))
# ### end Alembic commands ###