add scrub to conv
This commit is contained in:
parent
bfb4006b02
commit
c340a55925
1 changed files with 16 additions and 4 deletions
|
|
@ -1,9 +1,8 @@
|
||||||
import psycopg2
|
|
||||||
import sqlite3
|
|
||||||
import os
|
|
||||||
import argparse
|
import argparse
|
||||||
|
import os
|
||||||
|
import sqlite3
|
||||||
|
|
||||||
|
import psycopg2
|
||||||
from environs import Env # type: ignore
|
from environs import Env # type: ignore
|
||||||
|
|
||||||
env = Env()
|
env = Env()
|
||||||
|
|
@ -703,6 +702,19 @@ def migrate_ext(sqlite_db_file, schema, ignore_missing=True):
|
||||||
VALUES (%s, %s, %s, %s, %s, %s);
|
VALUES (%s, %s, %s, %s, %s, %s);
|
||||||
"""
|
"""
|
||||||
insert_to_pg(q, res.fetchall())
|
insert_to_pg(q, res.fetchall())
|
||||||
|
elif schema == "scrub":
|
||||||
|
# SCRUB LINKS
|
||||||
|
res = sq.execute("SELECT * FROM scrub.scrub_links;")
|
||||||
|
q = f"""
|
||||||
|
INSERT INTO scrub.scrub_links (
|
||||||
|
id,
|
||||||
|
wallet,
|
||||||
|
description,
|
||||||
|
payoraddress
|
||||||
|
)
|
||||||
|
VALUES (%s, %s, %s, %s);
|
||||||
|
"""
|
||||||
|
insert_to_pg(q, res.fetchall())
|
||||||
else:
|
else:
|
||||||
print(f"❌ Not implemented: {schema}")
|
print(f"❌ Not implemented: {schema}")
|
||||||
sq.close()
|
sq.close()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue