add mock data and fix conv

This commit is contained in:
Tiago vasconcelos 2022-07-28 11:08:55 +01:00
parent a601e178ea
commit 56cac668ca
2 changed files with 5 additions and 6 deletions

Binary file not shown.

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()
@ -540,8 +539,8 @@ def migrate_ext(sqlite_db_file, schema, ignore_missing=True):
# ITEMS
res = sq.execute("SELECT * FROM items;")
q = f"""
INSERT INTO offlineshop.items (shop, id, name, description, image, enabled, price, unit)
VALUES (%s, %s, %s, %s, %s, %s::boolean, %s, %s);
INSERT INTO offlineshop.items (shop, id, name, description, image, enabled, price, unit, fiat_base_multiplier)
VALUES (%s, %s, %s, %s, %s, %s::boolean, %s, %s, %s);
"""
items = res.fetchall()
insert_to_pg(q, items)