Prep for dynamic pivot for context settings

This commit is contained in:
Jan Kvetina 2021-12-30 00:29:29 +01:00
parent 39257a1915
commit 3c3a0396f1
2 changed files with 3838 additions and 79 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,28 @@
--DROP TABLE setting_contexts PURGE;
CREATE TABLE setting_contexts (
app_id NUMBER(4) CONSTRAINT nn_setting_contexts_app_id NOT NULL,
context_id VARCHAR2(64) CONSTRAINT nn_setting_contexts_name NOT NULL,
context_name VARCHAR2(64),
description_ VARCHAR2(1000),
order# NUMBER(4),
--
updated_by VARCHAR2(30),
updated_at DATE,
--
CONSTRAINT uq_setting_contexts
UNIQUE (app_id, context_id),
--
CONSTRAINT fk_setting_contexts_app_id
FOREIGN KEY (app_id)
REFERENCES apps (app_id)
)
STORAGE (BUFFER_POOL KEEP);
--
COMMENT ON TABLE setting_contexts IS 'List of setting_contexts shared through whole app';
--
COMMENT ON COLUMN setting_contexts.app_id IS 'Application ID';
COMMENT ON COLUMN setting_contexts.context_id IS 'To allow multiple values depending on context value';
COMMENT ON COLUMN setting_contexts.context_name IS 'Friendly name';
COMMENT ON COLUMN setting_contexts.description_ IS 'Description';
COMMENT ON COLUMN setting_contexts.order# IS 'Order for sorting purposes';