Skip to content

Commit

Permalink
updated migrations to use regular import of alembic_helpers geopython#15
Browse files Browse the repository at this point in the history
  • Loading branch information
cezio committed Feb 15, 2018
1 parent c7eda5d commit b371adf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 11 deletions.
6 changes: 1 addition & 5 deletions GeoHealthCheck/migrations/versions/2638c2a40625_.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,14 @@
import sqlalchemy as sa
import imp
import os

from GeoHealthCheck.migrations import alembic_helpers

# revision identifiers, used by Alembic.
revision = '2638c2a40625'
down_revision = '992013af402f'
branch_labels = None
depends_on = None

helpers_file = os.path.join(os.path.dirname(__file__), '..', 'alembic_helpers.py')
alembic_helpers = imp.load_source('alembic_helpers', helpers_file)



def upgrade():
if not alembic_helpers.table_has_column('resource', 'active'):
Expand Down
4 changes: 1 addition & 3 deletions GeoHealthCheck/migrations/versions/496427d03f87_.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import sqlalchemy as sa
import imp
import os

helpers_file = os.path.join(os.path.dirname(__file__), '..', 'alembic_helpers.py')
alembic_helpers = imp.load_source('alembic_helpers', helpers_file)
from GeoHealthCheck.migrations import alembic_helpers

# revision identifiers, used by Alembic.
revision = '496427d03f87'
Expand Down
4 changes: 1 addition & 3 deletions GeoHealthCheck/migrations/versions/992013af402f_.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@
import sqlalchemy as sa
import imp
import os

helpers_file = os.path.join(os.path.dirname(__file__), '..', 'alembic_helpers.py')
alembic_helpers = imp.load_source('alembic_helpers', helpers_file)
from GeoHealthCheck.migrations import alembic_helpers

# revision identifiers, used by Alembic.
revision = '992013af402f'
Expand Down

0 comments on commit b371adf

Please sign in to comment.