add scrub to conv

This commit is contained in:
Tiago vasconcelos 2022-07-28 10:00:53 +01:00
parent bfb4006b02
commit c340a55925

View File

@ -1,9 +1,8 @@
import psycopg2
import sqlite3
import os
import argparse
import os
import sqlite3
import psycopg2
from environs import Env # type: ignore
env = Env()
@ -703,6 +702,19 @@ def migrate_ext(sqlite_db_file, schema, ignore_missing=True):
VALUES (%s, %s, %s, %s, %s, %s);
"""
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:
print(f"❌ Not implemented: {schema}")
sq.close()