add handlers, storage(Postgres, sqlite) (#3)
Reviewed-on: #3 Co-authored-by: Evstigneev Denis <danteevstigneev@yandex.ru> Co-committed-by: Evstigneev Denis <danteevstigneev@yandex.ru>
This commit is contained in:
5
storage/migrations/sqlite/000001_init_schema.down.sql
Normal file
5
storage/migrations/sqlite/000001_init_schema.down.sql
Normal file
@@ -0,0 +1,5 @@
|
||||
drop table if exists dashboard ;
|
||||
drop table if exists package ;
|
||||
drop table if exists module ;
|
||||
drop table if exists issue ;
|
||||
drop table if exists comment;
|
38
storage/migrations/sqlite/000001_init_schema.up.sql
Normal file
38
storage/migrations/sqlite/000001_init_schema.up.sql
Normal file
@@ -0,0 +1,38 @@
|
||||
create table if not exists dashboard (
|
||||
id integer primary key autoincrement not null ,
|
||||
"uuid" uuid not null unique ,
|
||||
package integer[] default '{}'
|
||||
);
|
||||
|
||||
create table if not exists comment (
|
||||
id integer primary key autoincrement not null ,
|
||||
"text" text ,
|
||||
created timestamp not null default current_timestamp ,
|
||||
updated timestamp
|
||||
);
|
||||
|
||||
create table if not exists module (
|
||||
id integer primary key autoincrement not null ,
|
||||
name varchar not null ,
|
||||
version varchar not null ,
|
||||
last_version varchar not null
|
||||
);
|
||||
|
||||
create table if not exists issue (
|
||||
id serial not null unique primary key ,
|
||||
--package integer references package(id) ,
|
||||
modules integer[] default '[]',
|
||||
status integer default 0 ,
|
||||
"desc" varchar
|
||||
);
|
||||
|
||||
create table if not exists package (
|
||||
id integer primary key autoincrement not null ,
|
||||
name varchar not null ,
|
||||
url varchar ,
|
||||
modules integer[] default '[]',
|
||||
issues integer[] default '[]',
|
||||
comments integer[] default '[]'
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user