All Downloads are FREE. Search and download functionalities are using the official Maven repository.

database.mariadb.schema Maven / Gradle / Ivy

There is a newer version: 4.6.0-alpha.2
Show newest version
--
-- Script to create MariaDB schema
-- Table & index names are suffixed by 3 underscores to define a
-- pattern to replace with the reporter name
--
CREATE TABLE IF NOT EXISTS reporter_audits___ (id NVARCHAR(64) NOT NULL, transaction_id NVARCHAR(64) NULL, type NVARCHAR(255) NULL, reference_type NVARCHAR(64) NULL, reference_id NVARCHAR(64) NULL, timestamp timestamp(6) NULL, PRIMARY KEY (id))
CREATE TABLE IF NOT EXISTS reporter_audits_outcomes___ (audit_id NVARCHAR(64) NOT NULL, status NVARCHAR(64) NULL, message LONGTEXT NULL)
CREATE TABLE IF NOT EXISTS reporter_audits_access_points___ (audit_id NVARCHAR(64) NOT NULL, id VARCHAR(255), alternative_id NVARCHAR(64) NULL, display_name NVARCHAR(255) NULL, ip_address NVARCHAR(255) NULL, user_agent NVARCHAR(255) NULL)
CREATE TABLE IF NOT EXISTS reporter_audits_entities___ (audit_id NVARCHAR(64) NOT NULL, audit_field NVARCHAR(64) NOT NULL, id VARCHAR(64), alternative_id NVARCHAR(320) NULL, display_name NVARCHAR(255) NULL, type NVARCHAR(64) NULL, display_ame NVARCHAR(255) NULL, reference_type NVARCHAR(64) NULL, reference_id NVARCHAR(64) NULL, attributes LONGTEXT NULL)

CREATE INDEX IF NOT EXISTS idx_audits_ref___ ON reporter_audits___(reference_id, reference_type, timestamp)
CREATE INDEX IF NOT EXISTS idx_audits_evttype___ ON reporter_audits___(reference_id, reference_type, type, timestamp)
CREATE INDEX IF NOT EXISTS idx_audit_outcomes_id___ ON reporter_audits_outcomes___(audit_id)
CREATE INDEX IF NOT EXISTS idx_audit_outcomes_status___ ON reporter_audits_outcomes___(status)
CREATE INDEX IF NOT EXISTS idx_audit_access_pts_id___ ON reporter_audits_access_points___(audit_id)
CREATE INDEX IF NOT EXISTS idx_audit_access_pts_alt_id___ ON reporter_audits_access_points___(alternative_id)
CREATE INDEX IF NOT EXISTS idx_audit_ent_id___ ON reporter_audits_entities___(audit_id)
CREATE INDEX IF NOT EXISTS idx_audit_ent_alt_id___ ON reporter_audits_entities___(alternative_id)
CREATE INDEX IF NOT EXISTS idx_audit_ent_internal_id___ ON reporter_audits_entities___(id)




© 2015 - 2025 Weber Informatics LLC | Privacy Policy