Commit 646ead83 authored by Cédric Houbart's avatar Cédric Houbart
Browse files

Database scripts for currencies

parent 7cc96274
......@@ -437,6 +437,16 @@ CREATE TABLE SHAREDTICKETS (
PRIMARY KEY(ID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
CREATE TABLE CURRENCIES (
ID INTEGER NOT NULL,
NAME VARCHAR(255) NOT NULL,
SYMBOL VARCHAR(10) DEFAULT '' NOT NULL,
RATE DOUBLE DEFAULT 1.0 NOT NULL,
FORMAT VARCHAR(20) DEFAULT '#0.00 $' NOT NULL,
MAIN BIT NOT NULL,
PRIMARY KEY (ID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO `ROLES` (`ID`, `NAME`, `PERMISSIONS`) VALUES
('0', 'Administrator', 0x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c212d2d200a202020204f70656e627261766f20504f53206973206120706f696e74206f662073616c6573206170706c69636174696f6e2064657369676e656420666f7220746f7563682073637265656e732e0a20202020436f707972696768742028432920323030382d32303039204f70656e627261766f2c20532e4c2e0a20202020687474703a2f2f736f75726365666f7267652e6e65742f70726f6a656374732f6f70656e627261766f706f730a0a20202020546869732066696c652069732070617274206f66204f70656e627261766f20504f532e0a0a202020204f70656e627261766f20504f53206973206672656520736f6674776172653a20796f752063616e2072656469737472696275746520697420616e642f6f72206d6f646966790a20202020697420756e64657220746865207465726d73206f662074686520474e552047656e6572616c205075626c6963204c6963656e7365206173207075626c69736865642062790a20202020746865204672656520536f66747761726520466f756e646174696f6e2c206569746865722076657273696f6e2033206f6620746865204c6963656e73652c206f720a2020202028617420796f7572206f7074696f6e2920616e79206c617465722076657273696f6e2e0a0a202020204f70656e627261766f20504f5320697320646973747269627574656420696e2074686520686f706520746861742069742077696c6c2062652075736566756c2c0a2020202062757420574954484f555420414e592057415252414e54593b20776974686f7574206576656e2074686520696d706c6965642077617272616e7479206f660a202020204d45524348414e544142494c495459206f72204649544e45535320464f52204120504152544943554c415220505552504f53452e2020536565207468650a20202020474e552047656e6572616c205075626c6963204c6963656e736520666f72206d6f72652064657461696c732e0a0a20202020596f752073686f756c642068617665207265636569766564206120636f7079206f662074686520474e552047656e6572616c205075626c6963204c6963656e73650a20202020616c6f6e672077697468204f70656e627261766f20504f532e20204966206e6f742c20736565203c687474703a2f2f7777772e676e752e6f72672f6c6963656e7365732f3e2e0a202d2d3e0a3c7065726d697373696f6e733e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e73616c65732e4a50616e656c5469636b657453616c6573222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e73616c65732e4a50616e656c5469636b65744564697473222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e637573746f6d6572732e437573746f6d6572735061796d656e74222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e70616e656c732e4a50616e656c5061796d656e7473222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e70616e656c732e4a50616e656c436c6f73654d6f6e6579222f3e0a202020203c636c617373206e616d653d2273616c65732e456469744c696e6573222f3e0a202020203c636c617373206e616d653d2273616c65732e456469745469636b6574222f3e0a202020203c636c617373206e616d653d2273616c65732e526566756e645469636b6574222f3e0a202020203c636c617373206e616d653d2273616c65732e5072696e745469636b6574222f3e0a202020203c636c617373206e616d653d2273616c65732e546f74616c222f3e0a202020203c212d2d203c636c617373206e616d653d2273616c65732e4368616e67655461784f7074696f6e73222f3e202d2d3e0a202020203c636c617373206e616d653d227061796d656e742e63617368222f3e0a202020203c636c617373206e616d653d227061796d656e742e636865717565222f3e0a202020203c636c617373206e616d653d227061796d656e742e7061706572222f3e0a202020203c636c617373206e616d653d227061796d656e742e6d616763617264222f3e0a202020203c636c617373206e616d653d227061796d656e742e66726565222f3e0a202020203c636c617373206e616d653d227061796d656e742e64656274222f3e0a202020203c636c617373206e616d653d22726566756e642e63617368222f3e0a202020203c636c617373206e616d653d22726566756e642e636865717565222f3e0a202020203c636c617373206e616d653d22726566756e642e7061706572222f3e0a202020203c636c617373206e616d653d22726566756e642e6d616763617264222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e666f726d732e4d656e754d61696e74656e616e6365222f3e0a202020203c636c617373206e616d653d224d656e752e4261636b4f6666696365222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e61646d696e2e5265736f757263657350616e656c222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f7373796e632e50726f647563747353796e63437265617465222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f7373796e632e4f726465727353796e63437265617465222f3e0a202020203c636c617373206e616d653d224d656e752e4368616e676550617373776f7264222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e70616e656c732e4a50616e656c5072696e746572222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e636f6e6669672e4a50616e656c436f6e66696775726174696f6e222f3e0a202020203c636c617373206e616d653d22627574746f6e2e7072696e74222f3e0a202020203c636c617373206e616d653d22627574746f6e2e6f70656e647261776572222f3e0a202020203c636c617373206e616d653d22627574746f6e2e6f70656e6d6f6e6579222f3e0a3c2f7065726d697373696f6e733e0a),
('1', 'Manager', 0x3c3f786d6c2076657273696f6e3d22312e302220656e636f64696e673d225554462d38223f3e0a3c212d2d200a202020204f70656e627261766f20504f53206973206120706f696e74206f662073616c6573206170706c69636174696f6e2064657369676e656420666f7220746f7563682073637265656e732e0a20202020436f707972696768742028432920323030382d32303039204f70656e627261766f2c20532e4c2e0a20202020687474703a2f2f736f75726365666f7267652e6e65742f70726f6a656374732f6f70656e627261766f706f730a0a20202020546869732066696c652069732070617274206f66204f70656e627261766f20504f532e0a0a202020204f70656e627261766f20504f53206973206672656520736f6674776172653a20796f752063616e2072656469737472696275746520697420616e642f6f72206d6f646966790a20202020697420756e64657220746865207465726d73206f662074686520474e552047656e6572616c205075626c6963204c6963656e7365206173207075626c69736865642062790a20202020746865204672656520536f66747761726520466f756e646174696f6e2c206569746865722076657273696f6e2033206f6620746865204c6963656e73652c206f720a2020202028617420796f7572206f7074696f6e2920616e79206c617465722076657273696f6e2e0a0a202020204f70656e627261766f20504f5320697320646973747269627574656420696e2074686520686f706520746861742069742077696c6c2062652075736566756c2c0a2020202062757420574954484f555420414e592057415252414e54593b20776974686f7574206576656e2074686520696d706c6965642077617272616e7479206f660a202020204d45524348414e544142494c495459206f72204649544e45535320464f52204120504152544943554c415220505552504f53452e2020536565207468650a20202020474e552047656e6572616c205075626c6963204c6963656e736520666f72206d6f72652064657461696c732e0a0a20202020596f752073686f756c642068617665207265636569766564206120636f7079206f662074686520474e552047656e6572616c205075626c6963204c6963656e73650a20202020616c6f6e672077697468204f70656e627261766f20504f532e20204966206e6f742c20736565203c687474703a2f2f7777772e676e752e6f72672f6c6963656e7365732f3e2e0a202d2d3e0a3c7065726d697373696f6e733e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e73616c65732e4a50616e656c5469636b657453616c6573222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e73616c65732e4a50616e656c5469636b65744564697473222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e637573746f6d6572732e437573746f6d6572735061796d656e74222f3e202020200a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e70616e656c732e4a50616e656c5061796d656e7473222f3e0a202020203c636c617373206e616d653d22636f6d2e6f70656e627261766f2e706f732e70616e656c732e4a50616e656c436c6f73654d6f6e6579222f3e0a202020203c636c617373206e616d653d2273616c65732e456469744c696e6573222f3e0a202020203c636c617373206e616d653d2273616c65732e526566756e645469636b6574222f3e0a202020203c636c617373206e616d653d2273616c65732e5072696e745469636b6574222f3e0a202020203c636c617373206e616d653d2273616c65732e546f74616c222f3e0a202020203c636c617373206e616d653d227061796d656e742e63617368222f3e0a202020203c636c617373206e616d653d227061796d656e742e636865717565222f3e0a202020203c636c617373206e616d653d227061796d656e742e7061706572222f3e0a202020203c636c617373206e616d653d227061796d656e742e6d616763617264222f3e0a202020203c636c617373206e616d653d227061796d656e742e66726565222f3e0a202020203c636c617373206e616d653d227061796d656e742e64656274222f3e202020200a202020203c636c617373206e616d653d22726566756e642e63617368222f3e0a202020203c636c617373206e616d653d22726566756e642e636865717565222f3e0a202020203c636c617373206e616d653d22726566756e642e7061706572222f3e0a202020203c636c617373206e616d653d22726566756e642e6d616763617264222f3e0a202020203c636c617373206e616d653d224d656e752e4261636b4f6666696365222f3e0a202020203c636c617373206e616d653d224d656e752e4368616e676550617373776f7264222f3e0a202020203c636c617373206e616d653d22627574746f6e2e7072696e74222f3e0a202020203c636c617373206e616d653d22627574746f6e2e6f70656e647261776572222f3e0a202020203c636c617373206e616d653d22627574746f6e2e6f70656e6d6f6e6579222f3e0a3c2f7065726d697373696f6e733e0a),
......
......@@ -5,6 +5,8 @@ INSERT INTO CATEGORIES(ID, NAME) VALUES ('0', 'Formules');
INSERT INTO CATEGORIES(ID, NAME) VALUES ('-1', 'Pré-paiement');
INSERT INTO LOCATIONS(ID, NAME,ADDRESS) VALUES('0', 'Principal', NULL);
INSERT INTO CURRENCIES(ID, NAME, SYMBOL, RATE, FORMAT, MAIN) VALUES (0, 'Euro', '€', 1.0, '#0.00 $', 1);
-- Taxes
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('000', 'Sans TVA');
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('001', 'TVA 6%');
......
......@@ -5,6 +5,8 @@ INSERT INTO CATEGORIES(ID, NAME) VALUES ('0', 'Formules');
INSERT INTO CATEGORIES(ID, NAME) VALUES ('-1', 'Pré-paiement');
INSERT INTO LOCATIONS(ID, NAME,ADDRESS) VALUES('0', 'Principal', NULL);
INSERT INTO CURRENCIES(ID, NAME, SYMBOL, RATE, FORMAT, MAIN) VALUES (0, 'Euro', '€', 1.0, '#0.00 $', 1);
-- Taxes
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('000', 'Sans TVA');
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('001', 'TVA 2,5%');
......
......@@ -5,6 +5,8 @@ INSERT INTO CATEGORIES(ID, NAME) VALUES ('0', 'Formules');
INSERT INTO CATEGORIES(ID, NAME) VALUES ('-1', 'Pré-paiement');
INSERT INTO LOCATIONS(ID, NAME,ADDRESS) VALUES('0', 'Principal', NULL);
INSERT INTO CURRENCIES(ID, NAME, SYMBOL, RATE, FORMAT, MAIN) VALUES (0, 'Euro', '€', 1.0, '#0.00 $', 1);
-- Taxes
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('000', 'Sans TVA');
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('001', 'TVA 3%');
......
......@@ -61,4 +61,15 @@ CREATE TABLE TARIFFAREAS_PROD (
ALTER TABLE TICKETS ADD COLUMN TARIFFAREA VARCHAR(255) DEFAULT NULL;
ALTER TABLE TICKETS ADD CONSTRAINT TICKETS_TARIFFAREA FOREIGN KEY (TARIFFAREA) REFERENCES TARIFFAREAS(ID);
CREATE TABLE CURRENCIES (
ID INTEGER NOT NULL,
NAME VARCHAR(255) NOT NULL,
SYMBOL VARCHAR(10) DEFAULT '' NOT NULL,
RATE DOUBLE DEFAULT 1.0 NOT NULL,
FORMAT VARCHAR(20) DEFAULT '#0.00 $' NOT NULL,
MAIN BIT NOT NULL,
PRIMARY KEY (ID)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
INSERT INTO CURRENCIES(ID, NAME, SYMBOL, RATE, FORMAT, MAIN) VALUES (0, 'Euro', '€', 1.0, '#0.00 $', 1);
UPDATE APPLICATIONS SET VERSION = 4 WHERE ID = "postech";
Supports Markdown
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