Consolidate SQL migrations (pre-alpha, versioning was deceptive).
This commit is contained in:
parent
12b2e5edca
commit
b629ec1a14
@ -1,4 +1,5 @@
|
||||
-- DOWN script for initial-schema (20190214122514)
|
||||
drop table if exists "client_log_entries";
|
||||
drop table if exists "measurements";
|
||||
drop table if exists "measures";
|
||||
drop table if exists "api_tokens";
|
||||
|
@ -25,7 +25,8 @@ create table "measures" (
|
||||
slug varchar not null,
|
||||
name varchar not null,
|
||||
description varchar not null default '',
|
||||
domain_source varchar default null ,
|
||||
config jsonb not null default '{}'::json,
|
||||
domain_source varchar default null,
|
||||
domain_units varchar not null default '',
|
||||
range_source varchar default null,
|
||||
range_units varchar not null default '',
|
||||
@ -40,3 +41,15 @@ create table "measurements" (
|
||||
"timestamp" timestamp with time zone not null default current_timestamp,
|
||||
ext_data jsonb not null default '{}'::json
|
||||
);
|
||||
|
||||
create table client_log_entries (
|
||||
id serial primary key,
|
||||
user_id uuid not null references users (id),
|
||||
"level" varchar not null,
|
||||
"scope" varchar not null,
|
||||
message varchar not null,
|
||||
stacktrace varchar not null,
|
||||
"timestamp" timestamp with time zone not null default current_timestamp
|
||||
);
|
||||
|
||||
create index client_log_entries_by_level on client_log_entries ("level");
|
||||
|
@ -1,2 +0,0 @@
|
||||
-- DOWN script for logging (20190227225053)
|
||||
drop table client_log_entries;
|
@ -1,12 +0,0 @@
|
||||
-- UP script for logging (20190227225053)
|
||||
create table client_log_entries (
|
||||
id serial primary key,
|
||||
user_id uuid not null references users (id),
|
||||
"level" varchar not null,
|
||||
"scope" varchar not null,
|
||||
message varchar not null,
|
||||
stacktrace varchar not null,
|
||||
"timestamp" timestamp with time zone not null default current_timestamp
|
||||
);
|
||||
|
||||
create index client_log_entries_by_level on client_log_entries ("level");
|
Loading…
x
Reference in New Issue
Block a user