Postgres migrations: remove balance view before children (#353)

* remove balance view before childredn

* update readme

* CI with postgres

* install postgres in CI

* run postgres tests in CI?

* disable postgres tests for now
This commit is contained in:
callebtc
2023-11-01 20:55:52 -03:00
committed by GitHub
parent aa36651629
commit a4abbc2eee
4 changed files with 36 additions and 10 deletions

View File

@@ -57,11 +57,16 @@ async def ledger():
await ledger.load_used_proofs()
await ledger.init_keysets()
db_file = "test_data/mint/test.sqlite3"
if os.path.exists(db_file):
os.remove(db_file)
database_name = "test"
if not settings.mint_database.startswith("postgres"):
# clear sqlite database
db_file = os.path.join(settings.mint_database, database_name + ".sqlite3")
if os.path.exists(db_file):
os.remove(db_file)
ledger = Ledger(
db=Database("test", "test_data/mint"),
db=Database(database_name, settings.mint_database),
seed=settings.mint_private_key,
derivation_path=settings.mint_derivation_path,
lightning=FakeWallet(),