2024-10-16 12:01:16 +02:00
|
|
|
-- 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);
|
2024-10-16 12:01:16 +02:00
|
|
|
|
|
|
|
-- Create default composite models table.
|
|
|
|
CREATE TABLE composite_models (
|
|
|
|
firstcol SERIAL NOT NULL,
|
|
|
|
secondcol VARCHAR NOT NULL,
|
|
|
|
label VARCHAR NULL,
|
|
|
|
PRIMARY KEY (firstcol, secondcol)
|
|
|
|
);
|