Skip to content

Commit

Permalink
try adding albemic start with db schema
Browse files Browse the repository at this point in the history
  • Loading branch information
Josephine-Rutten committed Jan 17, 2024
1 parent 0e22aec commit 9c86d3c
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions alembic/versions/a3f3bc390462_alembic_start.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import sqlalchemy as sa

from alembic import op
import os

# revision identifiers, used by Alembic.
revision = "a3f3bc390462"
Expand All @@ -17,9 +18,11 @@


def upgrade():
# ### commands auto generated by Alembic - please adjust! ###
pass
# ### end Alembic commands ###
conn = op.get_bind()
# migrations_dir = os.path.join(os.path.dirname(os.path.realpath(__file__)))
with open(os.path.join("/mnt/c/Github/cnaas-nms/docker/postgres/nms.sql")) as f:
data = f.read()
conn.execute(sa.text(data))


def downgrade():
Expand Down

0 comments on commit 9c86d3c

Please sign in to comment.