feat(migration): Added initial migrations
This commit is contained in:
14
migrations/00001_create_service_table.sql
Normal file
14
migrations/00001_create_service_table.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- +goose Up
|
||||
create table if not exists service
|
||||
(
|
||||
id bigserial primary key,
|
||||
name varchar(255) not null,
|
||||
description varchar(255),
|
||||
host varchar(255) not null,
|
||||
type varchar(255) not null,
|
||||
type_config text,
|
||||
public_description varchar(255),
|
||||
public boolean default false
|
||||
);
|
||||
-- +goose Down
|
||||
drop table if exists service;
|
||||
13
migrations/00002_create_status_table.sql
Normal file
13
migrations/00002_create_status_table.sql
Normal file
@@ -0,0 +1,13 @@
|
||||
-- +goose Up
|
||||
create table status
|
||||
(
|
||||
id bigserial primary key,
|
||||
service_id bigint,
|
||||
status varchar(255) not null,
|
||||
created_at timestamp with time zone,
|
||||
description varchar(255),
|
||||
|
||||
constraint fk_service_statuses FOREIGN KEY (service_id) references service (id)
|
||||
);
|
||||
|
||||
-- +goose Down
|
||||
Reference in New Issue
Block a user