zrm/tests/initdb.sql

23 lines
557 B
MySQL
Raw Normal View History

-- Cleanup existing database content.
DROP SCHEMA public CASCADE;
CREATE SCHEMA public;
-- Create default models table.
CREATE TABLE models (
id SERIAL PRIMARY KEY,
name VARCHAR NOT NULL,
amount NUMERIC(12, 2) NOT NULL
);
-- Insert default data.
INSERT INTO models(name, amount) VALUES ('test', 50);
2024-10-22 15:44:41 +02:00
INSERT INTO models(name, amount) VALUES ('updatable', 33.12);
-- Create default composite models table.
CREATE TABLE composite_models (
firstcol SERIAL NOT NULL,
secondcol VARCHAR NOT NULL,
label VARCHAR NULL,
PRIMARY KEY (firstcol, secondcol)
);