Skip to content

Commit

Permalink
addressed the comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Nargis Sultani committed Oct 24, 2023
1 parent f86ae50 commit 3884e1e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
18 changes: 1 addition & 17 deletions db_revisions/env.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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():
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down Expand Up @@ -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 ###

0 comments on commit 3884e1e

Please sign in to comment.