From 915f3c2a4c29422489cf6df62a1e39549af81bf3 Mon Sep 17 00:00:00 2001 From: Ricard Illa Date: Sun, 25 Jun 2023 11:33:06 +0200 Subject: [PATCH] feat: tcin is the primary key now --- etl/main.py | 2 +- sql/products_schema.sql | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/etl/main.py b/etl/main.py index ec85ed7..796c8fd 100644 --- a/etl/main.py +++ b/etl/main.py @@ -46,7 +46,7 @@ def main(): password=opts.pg_password, database=opts.pg_database, table=opts.pg_table, - table_key="gtin13", + table_key="tcin", )) # fmt: on diff --git a/sql/products_schema.sql b/sql/products_schema.sql index 1a9868b..b38c2db 100644 --- a/sql/products_schema.sql +++ b/sql/products_schema.sql @@ -1,6 +1,6 @@ CREATE TABLE IF NOT EXISTS {{ params.output_table }} ( - gtin13 VARCHAR PRIMARY KEY, - tcin VARCHAR NOT NULL, + tcin VARCHAR PRIMARY KEY, + gtin13 VARCHAR NOT NULL, primary_category VARCHAR NOT NULL, materials VARCHAR[], packaging INT NOT NULL,