Skip to content

Commit

Permalink
MHR API verify new CI script - update db upgrade.
Browse files Browse the repository at this point in the history
Signed-off-by: Doug Lovett <doug@diamante.ca>
  • Loading branch information
doug-lovett committed Dec 11, 2024
1 parent c969cf9 commit 15fe048
Showing 1 changed file with 3 additions and 39 deletions.
42 changes: 3 additions & 39 deletions mhr-api/migrations/versions/0001_rebase_2024-10.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,26 +23,9 @@

def upgrade():
# ### Manually install extensions. ###
# op.execute("CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;")
# op.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
# op.execute("CREATE EXTENSION IF NOT EXISTS btree_gist;")
public_fuzzystrmatch = PGExtension(
schema="public",
signature="fuzzystrmatch"
)
op.create_entity(public_fuzzystrmatch)

public_btree_gist = PGExtension(
schema="public",
signature="btree_gist"
)
op.create_entity(public_btree_gist)

public_pg_trgm = PGExtension(
schema="public",
signature="pg_trgm"
)
op.create_entity(public_pg_trgm)
op.execute("CREATE EXTENSION IF NOT EXISTS fuzzystrmatch;")
op.execute("CREATE EXTENSION IF NOT EXISTS pg_trgm;")
op.execute("CREATE EXTENSION IF NOT EXISTS btree_gist;")

# ### Manually create sequences and add them to pk columns. ###
# PPR sequences
Expand Down Expand Up @@ -3626,25 +3609,6 @@ def downgrade():
op.execute(DropSequence(Sequence('word_id_seq')))
op.execute(DropSequence(Sequence('name_id_seq')))

# Manually added drop extensions
public_pg_trgm = PGExtension(
schema="public",
signature="pg_trgm"
)
op.drop_entity(public_pg_trgm)

public_btree_gist = PGExtension(
schema="public",
signature="btree_gist"
)
op.drop_entity(public_btree_gist)

public_fuzzystrmatch = PGExtension(
schema="public",
signature="fuzzystrmatch"
)
op.drop_entity(public_fuzzystrmatch)

public_mhr_account_reg_vw = PGView(
schema="public",
signature="mhr_account_reg_vw",
Expand Down

0 comments on commit 15fe048

Please sign in to comment.