learn-request-queue/db/00-version.sql

12 lines
268 B
MySQL
Raw Normal View History

2020-11-01 20:47:47 +00:00
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;
2020-11-10 07:04:05 +00:00
INSERT INTO version (major,minor) VALUES (0,2);