2019-01-09 02:40:17 +01:00
|
|
|
CREATE TABLE robot (
|
2019-01-07 10:26:50 +01:00
|
|
|
id SERIAL PRIMARY KEY NOT NULL,
|
|
|
|
name varchar(255),
|
|
|
|
description varchar(1024),
|
|
|
|
project_id int,
|
2019-02-20 09:51:36 +01:00
|
|
|
expiration int,
|
2019-01-07 10:26:50 +01:00
|
|
|
disabled boolean DEFAULT false NOT NULL,
|
|
|
|
creation_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
update_time timestamp default CURRENT_TIMESTAMP,
|
|
|
|
CONSTRAINT unique_robot UNIQUE (name, project_id)
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE TRIGGER robot_update_time_at_modtime BEFORE UPDATE ON robot FOR EACH ROW EXECUTE PROCEDURE update_update_time_at_column();
|