DB backups before migrations (#420)

* make backups before migrations

* database tests

* postgres db backup with location string

* ignore version in pg_dump and throw warning

* install latest pg_dump

* install latest

* pg update?

* remove test from github

* skip for postgres on github actions
This commit is contained in:
callebtc
2024-02-11 20:23:43 +01:00
committed by GitHub
parent 6fd66b9d72
commit 464c0e0ea4
4 changed files with 131 additions and 0 deletions

View File

@@ -497,3 +497,13 @@ async def m014_proofs_add_Y_column(db: Database):
# recreate the balance views
await create_balance_views(db, conn)
async def m015_add_index_Y_to_proofs_used(db: Database):
# create index on proofs_used table for Y
async with db.connect() as conn:
await conn.execute(
"CREATE INDEX IF NOT EXISTS"
" proofs_used_Y_idx ON"
f" {table_with_schema(db, 'proofs_used')} (Y)"
)