diff --git a/db_revisions/env.py b/db_revisions/env.py index 4a0c2d9..c09d478 100644 --- a/db_revisions/env.py +++ b/db_revisions/env.py @@ -4,7 +4,7 @@ from sqlalchemy import engine_from_config from sqlalchemy import pool from alembic import context -from src.entities.models import Base +from entities.models import Base # this is the Alembic Config object, which provides # access to the values within the .ini file in use. @@ -105,22 +105,6 @@ def run_migrations_online() -> None: with context.begin_transaction(): context.run_migrations() - """connectable = engine_from_config( - config.get_section(config.config_ini_section, {}), - prefix="sqlalchemy.", - poolclass=pool.NullPool, - ) - - with connectable.connect() as connection: - context.configure( - connection=connection, - target_metadata=target_metadata, - version_table_schema=target_metadata.schema, - include_object=include_object, - ) - - with context.begin_transaction(): - context.run_migrations()""" if context.is_offline_mode(): diff --git a/db_revisions/versions/26556a57a06f_create_a_baseline_migrations.py b/db_revisions/versions/26556a57a06f_create_a_baseline_migrations.py index 6fa791b..c64bfb0 100644 --- a/db_revisions/versions/26556a57a06f_create_a_baseline_migrations.py +++ b/db_revisions/versions/26556a57a06f_create_a_baseline_migrations.py @@ -19,7 +19,6 @@ def upgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### op.create_table( "denied_domains", sa.Column("domain", sa.String(), nullable=False), @@ -53,17 +52,9 @@ def upgrade() -> None: op.create_index( op.f("ix_financial_institution_domains_lei"), "financial_institution_domains", ["lei"], unique=False ) - # ### end Alembic commands ### def downgrade() -> None: - # ### commands auto generated by Alembic - please adjust! ### - op.drop_index(op.f("ix_financial_institution_domains_lei"), table_name="financial_institution_domains") - op.drop_index(op.f("ix_financial_institution_domains_domain"), table_name="financial_institution_domains") op.drop_table("financial_institution_domains") - op.drop_index(op.f("ix_financial_institutions_name"), table_name="financial_institutions") - op.drop_index(op.f("ix_financial_institutions_lei"), table_name="financial_institutions") op.drop_table("financial_institutions") - op.drop_index(op.f("ix_denied_domains_domain"), table_name="denied_domains") op.drop_table("denied_domains") - # ### end Alembic commands ###