Skip to content

Commit

Permalink
fix: alembic revision issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nrjadkry committed Oct 3, 2023
1 parent 2dfb69f commit b4decc8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ services:
- fmtm_images:/opt/app/images
- fmtm_tiles:/opt/tiles
- ./src/backend/app:/opt/app
- ./src/backend/migrations:/opt/migrations
# - ../osm-fieldwork/osm_fieldwork:/home/appuser/.local/lib/python3.10/site-packages/osm_fieldwork
depends_on:
- fmtm-db
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,14 @@
Create Date: 2023-09-26 09:04:00.676103
"""
import imp

import os

import geoalchemy2
import sqlalchemy as sa
from alembic import op
from sqlalchemy.dialects import postgresql

alembic_helpers = imp.load_source(
"alembic_helpers",
(os.getcwd() + "/" + op.get_context().script.dir + "/alembic_helpers.py"),
)

# revision identifiers, used by Alembic.
revision = "ec28a415c8d8"
down_revision = None
Expand All @@ -26,6 +21,13 @@


def upgrade() -> None:

import imp
alembic_helpers = imp.load_source(
"alembic_helpers",
(os.getcwd() + "/" + op.get_context().script.dir + "/alembic_helpers.py"),
)

# ### commands auto generated by Alembic - please adjust! ###
if alembic_helpers.table_does_not_exist("loader_platform"):
op.create_table(
Expand Down

0 comments on commit b4decc8

Please sign in to comment.