Skip to content

Instantly share code, notes, and snippets.

@iSignal
Created November 15, 2019 18:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save iSignal/05d8107b227a952f60ffbbe706f8d70e to your computer and use it in GitHub Desktop.
Save iSignal/05d8107b227a952f60ffbbe706f8d70e to your computer and use it in GitHub Desktop.
2019-11-15 18:36:37,336 [INFO] from play.api.db.DefaultDBApi in main - Database [default] connected at jdbc:postgresql://localhost:5433/system_platform
2019-11-15 18:36:39,590 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started Commissioner TaskPool.
2019-11-15 18:36:39,591 [INFO] from com.yugabyte.yw.commissioner.Commissioner in main - Started TaskProgressMonitor thread.
2019-11-15 18:36:41,283 [WARN] from play.api.db.evolutions.ApplicationEvolutions in main - Your production database [default] needs evolutions!
# --- Rev:1,Ups - fda115c
create table access_key (
key_code varchar(255) not null,
provider_uuid uuid not null,
key_info TEXT not null,
constraint pk_access_key primary key (key_code,provider_uuid)
);
create table alert (
uuid uuid not null,
customer_uuid uuid not null,
create_time timestamp not null,
err_code Text not null,
type varchar(255),
message Text not null,
constraint pk_alert primary key (uuid)
);
create table availability_zone (
uuid uuid not null,
code varchar(25) not null,
name varchar(100) not null,
region_uuid uuid,
active boolean default true not null,
subnet varchar(50),
config TEXT,
constraint pk_availability_zone primary key (uuid)
);
create table backup (
backup_uuid uuid not null,
customer_uuid uuid not null,
state varchar(11) not null,
backup_info TEXT not null,
task_uuid uuid,
create_time timestamp not null,
update_time timestamp not null,
constraint ck_backup_state check (state in ('Failed','Skipped','Completed','In Progress','Deleted')),
constraint uq_backup_task_uuid unique (task_uuid),
constraint pk_backup primary key (backup_uuid)
);
create table certificate_info (
uuid uuid not null,
customer_uuid uuid not null,
label varchar(255),
start_date timestamp not null,
expiry_date timestamp not null,
private_key varchar(255) not null,
certificate varchar(255) not null,
constraint uq_certificate_info_label unique (label),
constraint pk_certificate_info primary key (uuid)
);
create table customer (
id bigint not null,
uuid uuid not null,
code varchar(15) not null,
email varchar(256) not null,
password_hash varchar(256) not null,
name varchar(256) not null,
creation_date timestamp not null,
auth_token varchar(255),
auth_token_issue_date timestamp,
api_token varchar(255),
features TEXT,
universe_uuids TEXT not null,
constraint uq_customer_uuid unique (uuid),
constraint uq_customer_email unique (email),
constraint pk_customer primary key (id)
);
create sequence customer_id_seq increment by 1;
create table customer_config (
config_uuid uuid not null,
customer_uuid uuid not null,
type varchar(25) not null,
name varchar(100) not null,
data TEXT not null,
constraint ck_customer_config_type check (type in ('STORAGE','OTHER','CALLHOME','ALERTS')),
constraint pk_customer_config primary key (config_uuid)
);
create table customer_task (
id bigint not null,
customer_uuid uuid not null,
task_uuid uuid not null,
target_type varchar(8) not null,
target_name varchar(255) not null,
type varchar(19) not null,
target_uuid uuid not null,
create_time timestamp not null,
completion_time timestamp,
constraint ck_customer_task_target_type check (target_type in ('Table','Node','Backup','Universe','Cluster','Provider')),
constraint ck_customer_task_type check (type in ('Delete','Add','Stop','Start','Backup','UpgradeSoftware','Remove','Update','Restore','BulkImportData','RotateEncryptionKey','Create','Release','UpgradeGflags')),
constraint pk_customer_task primary key (id)
);
create sequence customer_task_id_seq increment by 1;
create table health_check (
universe_uuid uuid not null,
check_time timestamp not null,
customer_id bigint,
details_json TEXT not null,
constraint pk_health_check primary key (universe_uuid,check_time)
);
create table instance_type (
provider_code varchar(255) not null,
instance_type_code varchar(255) not null,
active boolean default true not null,
num_cores integer not null,
mem_size_gb float not null,
instance_type_details_json TEXT,
constraint pk_instance_type primary key (provider_code,instance_type_code)
);
create table kms_config (
config_uuid uuid not null,
customer_uuid uuid not null,
key_provider varchar(100) not null,
auth_config TEXT not null,
version integer not null,
constraint ck_kms_config_key_provider check (key_provider in ('SMARTKEY','AWS')),
constraint pk_kms_config primary key (config_uuid)
);
create table kms_history (
config_uuid uuid not null,
target_uuid uuid not null,
type varchar(12) not null,
timestamp timestamp not null,
version integer not null,
key_ref varchar(255) not null,
constraint ck_kms_history_type check (type in ('UNIVERSE_KEY')),
constraint pk_kms_history primary key (config_uuid,target_uuid,type)
);
create table metric_config (
config_key varchar(100) not null,
config TEXT not null,
constraint pk_metric_config primary key (config_key)
);
create table node_instance (
node_uuid uuid not null,
instance_type_code varchar(255),
node_name varchar(255) not null,
zone_uuid uuid not null,
in_use boolean not null,
node_details_json varchar(255) not null,
constraint pk_node_instance primary key (node_uuid)
);
create table price_component (
provider_code varchar(255) not null,
region_code varchar(255) not null,
component_code varchar(255) not null,
price_details_json TEXT not null,
constraint pk_price_component primary key (provider_code,region_code,component_code)
);
create table provider (
uuid uuid not null,
code varchar(255) not null,
name varchar(255) not null,
active boolean default true not null,
customer_uuid uuid not null,
config TEXT not null,
constraint pk_provider primary key (uuid)
);
create table region (
uuid uuid not null,
code varchar(25) not null,
name varchar(100) not null,
yb_image varchar(255),
longitude float,
latitude float,
provider_uuid uuid,
active boolean default true not null,
details TEXT,
config TEXT,
constraint pk_region primary key (uuid)
);
create table schedule (
schedule_uuid uuid not null,
customer_uuid uuid not null,
failure_count integer default 0 not null,
frequency bigint not null,
task_params TEXT not null,
task_type varchar(29) not null,
status varchar(7) not null,
cron_expression varchar(255),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment