12 lines
268 B
MySQL
12 lines
268 B
MySQL
|
CREATE TABLE version (
|
||
|
major INT NOT NULL,
|
||
|
minor INT NOT NULL,
|
||
|
PRIMARY KEY (major,minor)
|
||
|
);
|
||
|
|
||
|
CREATE OR REPLACE FUNCTION get_version() RETURNS VARCHAR
|
||
|
AS $$SELECT major || '.' || minor FROM version $$
|
||
|
LANGUAGE SQL;
|
||
|
|
||
|
INSERT INTO version (major,minor) VALUES (0,1);
|