2023-08-09 14:31:23 +03:00
|
|
|
create table if not exists dashboard (
|
|
|
|
id serial not null unique primary key ,
|
2023-08-10 12:38:55 +03:00
|
|
|
"uuid" uuid not null unique default gen_random_uuid() ,
|
|
|
|
package integer[] default '{}'::integer[]
|
2023-08-09 14:31:23 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
create table if not exists comment (
|
|
|
|
id serial not null unique primary key ,
|
2023-08-10 12:38:55 +03:00
|
|
|
"text" text ,
|
2023-08-09 14:31:23 +03:00
|
|
|
created timestamp not null default current_timestamp ,
|
|
|
|
updated timestamp
|
|
|
|
);
|
|
|
|
|
|
|
|
create table if not exists module (
|
|
|
|
id serial not null unique primary key ,
|
|
|
|
name varchar not null ,
|
2023-08-10 17:53:11 +03:00
|
|
|
version varchar not null ,
|
|
|
|
last_version varchar not null
|
2023-08-09 14:31:23 +03:00
|
|
|
);
|
|
|
|
|
|
|
|
create table if not exists issue (
|
|
|
|
id serial not null unique primary key ,
|
|
|
|
--package integer references package(id) ,
|
2023-08-10 12:38:55 +03:00
|
|
|
modules integer[] default '{}'::integer[],
|
2023-08-09 14:31:23 +03:00
|
|
|
status integer default 0 ,
|
|
|
|
"desc" varchar
|
|
|
|
);
|
|
|
|
|
|
|
|
create table if not exists package (
|
|
|
|
id serial not null unique primary key ,
|
|
|
|
name varchar not null ,
|
|
|
|
url varchar ,
|
2023-08-10 12:38:55 +03:00
|
|
|
modules integer[] default '{}'::integer[],
|
|
|
|
issues integer[] default '{}'::integer[],
|
|
|
|
comments integer[] default '{}'::integer[]
|
2023-08-09 14:31:23 +03:00
|
|
|
);
|
|
|
|
|
2023-08-10 17:53:11 +03:00
|
|
|
create unique index module_info on module(name, version);
|
2023-08-09 14:31:23 +03:00
|
|
|
|