db changes
authorKilian Saffran <ksaffran@dks.lu>
Sun, 24 Mar 2019 17:39:40 +0000 (18:39 +0100)
committerKilian Saffran <ksaffran@dks.lu>
Sun, 24 Mar 2019 17:39:40 +0000 (18:39 +0100)
db/cashbox.sqlite.dump.sql [new file with mode: 0644]
db/cashbox.sqlite.schema.sql

diff --git a/db/cashbox.sqlite.dump.sql b/db/cashbox.sqlite.dump.sql
new file mode 100644 (file)
index 0000000..ffc65a9
--- /dev/null
@@ -0,0 +1,145 @@
+PRAGMA foreign_keys=OFF;
+BEGIN TRANSACTION;
+CREATE TABLE payementtypes (
+       id TEXT,
+       name TEXT,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP,
+       primary key (id)
+);
+CREATE TABLE products (
+       id TEXT,
+       id_group TEXT,
+       name TEXT,
+       specification TEXT,
+       netamount REAL,
+       grossamount REAL,
+       vatpercent REAL,
+       visible BOOLEAN,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP, productgroup TEXT,
+       primary key (id)
+);
+INSERT INTO products VALUES('523FB3C9-562A-7644-9E0C-664A94984B60',NULL,'Softdrink  (Cola, Fanta, Sprite)','0,3',1.3999999999999999111,1.3999999999999999111,NULL,1,'2019-03-18 20:31:18',NULL,'Boissons');
+INSERT INTO products VALUES('BE438932-ECDB-DF46-B0D8-5F1A4E2A8E77',NULL,'Rosport Bleu','0,5',1.3999999999999999111,1.3999999999999999111,NULL,1,'2019-03-18 20:31:18',NULL,'Boissons');
+INSERT INTO products VALUES('272B688C-FC90-D344-BC93-F4C4C0E78183',NULL,'Vittel','0,3',1.1999999999999999555,1.1999999999999999555,NULL,NULL,'2019-03-18 20:31:18',NULL,'Boissons');
+INSERT INTO products VALUES('9DF50B2D-8F58-CA4A-9F58-00E71138C80C',NULL,'Bière (Bouteille) Bofferding','0,33',2.0,2.0,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('E6AAD31B-B6E9-BE47-B221-4315ABFEF81D',NULL,'Bière (Mini) Bofferding','0,33',2.2000000000000001776,2.2000000000000001776,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('77D2A8A5-A1FE-704B-AF52-99817B25B7C7',NULL,'Pol Fabire brut','0,25',4.2000000000000001776,4.2000000000000001776,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('8D03C7EF-A773-6247-A0E3-057FA355B263',NULL,'Cellier rouge','0,25',2.2999999999999998223,2.2999999999999998223,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('EA1AFD8A-F839-5C47-9050-5EFF8229D12E',NULL,'Cellier rosé','0,25',2.2999999999999998223,2.2999999999999998223,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('242C42D6-3CC6-5147-8C68-C5F954B140B7',NULL,'Vin blanc (Rivaner / Elbling)','0,25',4.0,4.0,NULL,1,'2019-03-18 20:31:18',NULL,'Alcohol');
+INSERT INTO products VALUES('20683124-2DF2-FF4A-BC76-3844D26174A2',NULL,'Lëtzebuerger Grillwurscht',NULL,3.0,3.0,NULL,1,'2019-03-05 08:50:42',NULL,'Food');
+INSERT INTO products VALUES('6C487085-4221-F546-97BC-D3850E7742E6',NULL,'Lëtzebuerger Mettwurscht',NULL,3.0,3.0,NULL,1,'2019-03-05 08:50:42',NULL,'Food');
+INSERT INTO products VALUES('7B3B40EB-CC33-3140-9752-5FCE492796A0',NULL,'Edamer',NULL,3.0,3.0,NULL,1,'2019-03-05 08:50:42',NULL,'Food');
+INSERT INTO products VALUES('C507FA4B-31C1-144B-8F50-6BCF0B4E62DF',NULL,'Gauffre (sucre)',NULL,2.5,2.5,NULL,1,'2019-03-05 08:50:42',NULL,'Dessert');
+INSERT INTO products VALUES('D6C1C2A0-9343-C348-8786-1547F37ADB0E',NULL,'Gaufre (chantilly)',NULL,3.0,3.0,NULL,1,'2019-03-05 08:50:42',NULL,'Dessert');
+INSERT INTO products VALUES('0367CCA3-1FBB-DF41-AB10-ECDDFB3D0AC0',NULL,'Gaufre (chantily + fraises)',NULL,3.0,3.0,NULL,1,'2019-03-05 08:50:42',NULL,'Dessert');
+CREATE TABLE transactions (
+       id TEXT,
+       id_payementtype TEXT,
+       id_client TEXT,
+       id_table TEXT,
+       id_product TEXT,
+       netamount REAL,
+       vatamount REAL,
+       grossamount REAL,
+       payedamount REAL,
+       cashbackamount REAL,
+       status TEXT,
+       statusdate DATE,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP,
+       primary key (id)
+);
+CREATE TABLE transactiondata (
+       id TEXT,
+       id_transaction TEXT,
+       id_product TEXT,
+       id_client TEXT,
+       id_table TEXT,
+       netamount REAL,
+       vatamount REAL,
+       grossamount REAL,
+       quantity integer,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP,
+       primary key (id)
+);
+CREATE TABLE printtemplates (
+       id TEXT,
+       name TEXT,
+       templatedesign TEXT,
+       templatesql TEXT,
+       templatetype TEXT,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP,
+       primary key (id)
+);
+CREATE TABLE stations (\r
+       id TEXT,\r
+       hostname TEXT,\r
+       type TEXT,\r
+       currentip TEXT,\r
+       staffmember TEXT,\r
+       status TEXT,\r
+       location TEXT,\r
+       modified DATETIME defaults CURRENT_TIMESTAMP,\r
+       created DATETIME defaults CURRENT_TIMESTAMP,\r
+       primary key (id)\r
+);
+CREATE TABLE config (
+       id TEXT,
+       value TEXT,
+       primary key (id)
+);
+INSERT INTO config VALUES('cardpayement_enabled','1');
+INSERT INTO config VALUES('checkout_grouping','1');
+CREATE TABLE accounts (
+       id TEXT,
+       name TEXT,
+       type TEXT, 
+       clientnumber text,
+       prename TEXT,
+       surname TEXT,
+       address TEXT,
+       zip TEXT,
+       city TEXT,
+       country TEXT,
+       phone TEXT,
+       email text,
+       description TEXT,
+       location TEXT,
+       modified DATETIME defaults CURRENT_TIMESTAMP,
+       created DATETIME defaults CURRENT_TIMESTAMP,
+       primary key (id)
+);
+CREATE TRIGGER trg_payementtypes_upd UPDATE ON payementtypes
+ BEGIN
+  UPDATE payementtypes SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+CREATE TRIGGER trg_products_upd UPDATE ON products
+ BEGIN
+  UPDATE products SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+CREATE TRIGGER trg_transactions_upd UPDATE ON transactions
+ BEGIN
+  UPDATE transactions SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+CREATE TRIGGER trg_transactiondata_upd UPDATE ON transactiondata
+ BEGIN
+  UPDATE transactiondata SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+CREATE TRIGGER trg_printtemplates_upd UPDATE ON printtemplates
+ BEGIN
+  UPDATE printtemplates SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+CREATE TRIGGER trg_stations_upd UPDATE ON stations\r
+ BEGIN\r
+  UPDATE stations SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;\r
+ END;
+CREATE TRIGGER trg_accounts_upd UPDATE ON accounts
+ BEGIN
+  UPDATE accounts SET modified=CURRENT_TIMESTAMP WHERE id = NEW.id;
+ END;
+COMMIT;
index 14c9d30..f5bc007 100644 (file)
Binary files a/db/cashbox.sqlite.schema.sql and b/db/cashbox.sqlite.schema.sql differ