-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtable.sql
More file actions
42 lines (30 loc) · 950 Bytes
/
table.sql
File metadata and controls
42 lines (30 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
CREATE SCHEMA IF NOT EXISTS nse_query_builder;
CREATE TABLE nse_query_builder.saved_queries (
id INT AUTO_INCREMENT PRIMARY KEY,
query_name VARCHAR(100),
sql_text TEXT,
canvas_json JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
created_by INT,
query_status VARCHAR(100)
);
CREATE TABLE nse_query_builder.dwh_table_data (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
columns JSON,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
access_codes VARCHAR(100)
);
CREATE TABLE nse_query_builder.dwh_rbac_users (
id INT AUTO_INCREMENT PRIMARY KEY,
name VARCHAR(100),
emp_id VARCHAR(100),
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
-- Add access id based on role based controls
access_id VARCHAR(100),
hashed_password VARCHAR(100)
);
CREATE TABLE nse_query_builder.query_queue (
id INT AUTO_INCREMENT PRIMARY KEY,
query_id INT FOREIGN KEY,
);