2023-08-18 23:59:15 +03:00
|
|
|
create table if not exists comments (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
comment text,
|
|
|
|
package integer not null,
|
|
|
|
created timestamp not null default current_timestamp,
|
|
|
|
updated timestamp not null default current_timestamp
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
|
|
create table if not exists issues (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
status integer default 0,
|
|
|
|
comment varchar,
|
|
|
|
created timestamp not null default current_timestamp,
|
|
|
|
updated timestamp not null default current_timestamp
|
|
|
|
);
|
|
|
|
|
2023-09-23 21:16:26 +03:00
|
|
|
create table if not exists handlers (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
package integer not null,
|
|
|
|
name varchar,
|
|
|
|
coverage number default 0
|
|
|
|
);
|
|
|
|
|
2023-08-18 23:59:15 +03:00
|
|
|
create table if not exists packages (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
name varchar not null,
|
|
|
|
url varchar not null,
|
2023-09-23 21:16:26 +03:00
|
|
|
description varchar,
|
2023-08-18 23:59:15 +03:00
|
|
|
modules integer default 0,
|
|
|
|
issues integer default 0,
|
|
|
|
comments integer default 0,
|
2023-08-20 14:19:57 +03:00
|
|
|
coverage number default 0,
|
2023-08-18 23:59:15 +03:00
|
|
|
created timestamp not null default current_timestamp,
|
|
|
|
updated timestamp not null default current_timestamp,
|
|
|
|
status integer default 1,
|
|
|
|
last_check timestamp
|
|
|
|
);
|
2023-08-19 16:55:52 +03:00
|
|
|
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS unique_idx_url on packages (url);
|
|
|
|
|
|
|
|
create table if not exists modules (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
name varchar not null,
|
|
|
|
version varchar not null,
|
|
|
|
last_check timestamp not null default current_timestamp
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS unique_idx_name_version on modules (name,version);
|
|
|
|
|
|
|
|
create table if not exists packages_modules (
|
|
|
|
id integer primary key autoincrement not null,
|
|
|
|
package integer,
|
|
|
|
module integer not null
|
|
|
|
);
|
|
|
|
|
|
|
|
CREATE UNIQUE INDEX IF NOT EXISTS unique_idx_package_module on packages_modules (package,module);
|