Bug 7167: New version for updatedatabase
[koha.git] / installer / data / mysql / versions / update_sample.sql.sample
1 -- This is an example for .sql file
2 -- all the comments (ie= what is after --) will be identified as comment
3 -- and displayed as such in Koha updatedatabase interface
4 -- the .sql is easy: just define a separator if you plan to have multi-line SQL
5 -- then, your sql
6
7 -- basic example, without delimiter defined:
8 UPDATE systempreferences SET value="something" WHERE variable="TestSysprefBasic";
9 INSERT INTO itemtypes (itemtype, description) VALUES ('SAMPLE','A description');
10 -- End of basic sample
11
12
13 -- more complex example, with delimiter defined:
14 DELIMITER //
15 -- I've defined a delimiter
16 -- so I can put SQL on many lines
17 -- Note that in this sample, the ; at the end of each query is not required.
18 CREATE TABLE `testtable1` (
19                     `entry` varchar(255) NOT NULL default '',
20                     `weight` bigint(20) NOT NULL default 0,
21                     PRIMARY KEY  (`entry`)
22                     ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
23 //
24 -- or on a single line, as previously
25 -- without ; just for the sample
26 INSERT INTO `systempreferences` VALUES ('TestSyspref1','2','set the level of error info sent to the browser. 0=none, 1=some, 2=most','0|1|2','Choice')
27 //