migration fix attempt
This commit is contained in:
parent
fef50a304f
commit
55eacd1009
1 changed files with 6 additions and 4 deletions
|
|
@ -1,6 +1,8 @@
|
|||
import secp256k1
|
||||
|
||||
|
||||
|
||||
|
||||
async def m001_initial(db):
|
||||
"""
|
||||
Initial tables
|
||||
|
|
@ -68,13 +70,13 @@ async def m003_default_config(db):
|
|||
"""
|
||||
await db.execute(
|
||||
"""
|
||||
INSERT OR IGNORE INTO nwcprovider.config (key, value) VALUES ('relay', 'nostrclient');
|
||||
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('relay', 'nostrclient');
|
||||
"""
|
||||
)
|
||||
new_private_key = bytes.hex(secp256k1._gen_private_key())
|
||||
await db.execute(
|
||||
"""
|
||||
INSERT OR IGNORE INTO nwcprovider.config (key, value) VALUES ('provider_key', :provider_key);
|
||||
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('provider_key', :provider_key);
|
||||
""",
|
||||
{"provider_key": new_private_key},
|
||||
)
|
||||
|
|
@ -87,9 +89,9 @@ async def m004_default_config2(db):
|
|||
|
||||
await db.execute(
|
||||
"""
|
||||
INSERT OR IGNORE INTO nwcprovider.config (key, value) VALUES ('relay_alias', ?);
|
||||
INSERT OR REPLACE INTO nwcprovider.config (key, value) VALUES ('relay_alias', :value);
|
||||
""",
|
||||
("",),
|
||||
{"value":""},
|
||||
)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue