Skip to content
Snippets Groups Projects
Commit 037cdf5d authored by BEAUVAIS ANTOINE's avatar BEAUVAIS ANTOINE
Browse files

Added a new table for stocks.

parent 7b61e336
Branches
1 merge request!1Merge 'develop' changes into 'master'.
DROP TABLE IF EXISTS stocks;
DROP TABLE IF EXISTS registry;
DROP TABLE IF EXISTS transaction_types;
DROP TABLE IF EXISTS accounts;
......@@ -40,6 +41,13 @@ CREATE TABLE registry (
FOREIGN KEY (account_id) REFERENCES accounts (id)
);
CREATE TABLE stocks (
id INTEGER PRIMARY KEY,
item INTEGER NOT NULL,
quantity INTEGER NOT NULL,
FOREIGN KEY (item) REFERENCES items (ref)
);
INSERT INTO categories (id, name)
VALUES (1, "Boissons"),
(2, "Snacks");
......@@ -78,3 +86,8 @@ INSERT INTO registry (id, dt, type, account_id, debit, credit, remarks)
(9, datetime("2021-09-21 05:00:00"), 3, 7, 72.0, null, "Facture vente = Dette client"),
(10, datetime("2021-09-21 05:30:00"), 4, 7, null, 72.0, "Encaissement de l'argent"),
(11, datetime("2021-09-21 06:00:00"), 4, 2, 72.0, null, "= La dette du client est soldée");
INSERT INTO stocks (id, item, quantity)
VALUES(1, 1, 25),
VALUES(2, 2, 12),
VALUES(3, 3, 50);
\ No newline at end of file
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment