From 0c581dff0bf9747866ca4a9558e3e18e135aa2fd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?King=20K=C3=A9vin?= Date: Mon, 23 Jan 2023 14:20:48 +0100 Subject: [PATCH] sql: remove price information --- schema.sql | 29 ----------------------------- 1 file changed, 29 deletions(-) diff --git a/schema.sql b/schema.sql index 197d34c..ac65a98 100644 --- a/schema.sql +++ b/schema.sql @@ -78,35 +78,6 @@ CREATE TABLE IF NOT EXISTS stock ( FOREIGN KEY (distribution) REFERENCES distribution (id) ); --- price currency -CREATE TABLE IF NOT EXISTS currency ( - id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index - name TEXT NOT NULL -); - --- currency rate -CREATE TABLE IF NOT EXISTS rate ( - origin INTEGER NOT NULL, -- from - destination INTEGER NOT NULL, -- to - rate REAL NOT NULL, -- 1 from = rate to - date DATETIME NOT NULL, -- date of the rate - FOREIGN KEY (origin) REFERENCES currency (id), - FOREIGN KEY (destination) REFERENCES currency (id) -); - --- part price at a distributor -CREATE TABLE IF NOT EXISTS price ( - id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index - distribution INTEGER NOT NULL, -- the part - quantity INTEGER NOT NULL, -- the minimum number of part for this price - price REAL NOT NULL, -- the unit price - currency INTEGER NOT NULL, - date DATETIME NOT NULL, - FOREIGN KEY (distribution) REFERENCES distribution (id), - FOREIGN KEY (currency) REFERENCES currency (id) -); - --- document types CREATE TABLE IF NOT EXISTS document ( id INTEGER AUTO_INCREMENT PRIMARY KEY, -- index type TEXT -- document type