matabas/schema.sql

12 lines
395 B
MySQL
Raw Normal View History

2023-08-09 22:41:11 +02:00
CREATE TABLE IF NOT EXISTS ingredient
( product_id INTEGER NOT NULL PRIMARY KEY -- https://handlaprivatkund.ica.se/stores/1004247/api/v4/products/bop?retailerProductId=...
);
CREATE TABLE IF NOT EXISTS ingredient_data
( product_id INTEGER REFERENCES ingredient(product_id)
, name TEXT NOT NULL
, cost_per_kg REAL NOT NULL
, cost_per_unit REAL NOT NULL
, image BYTEA NOT NULL
);