Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add migration for metrics and charts #261

Merged
merged 1 commit into from
Mar 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
CREATE TABLE IF NOT EXISTS silva.openings_last_year (
opening_id DECIMAL(10,0) NOT NULL,
opening_entry_userid VARCHAR(30) NOT NULL,
entry_timestamp TIMESTAMP NOT NULL,
update_timestamp TIMESTAMP NOT NULL,
CONSTRAINT openings_per_year_pk
primary key(opening_id)
);

-- Activity type comes from THE.RESULTS_AUDIT_ACTION_CODE
-- Status comes from THE.OPENING_STATUS_CODE
CREATE TABLE IF NOT EXISTS silva.openings_activitiy (
opening_id DECIMAL(10,0) NOT NULL,
activity_type_code VARCHAR(3),
activity_type_desc VARCHAR(120),
status_code VARCHAR(3) NOT NULL,
status_desc VARCHAR(120) NOT NULL,
opening_entry_timestamp TIMESTAMP NOT NULL,
opening_update_timestamp TIMESTAMP,
opening_entry_userid VARCHAR(30) NOT NULL,
stocking_entry_timestamp TIMESTAMP,
stocking_entry_userid VARCHAR(30),
audit_timestamp TIMESTAMP,
audit_entry_userid VARCHAR(30),
CONSTRAINT openings_activitiy_pk
primary key(opening_id)
);