1 CREATE TABLE saved_reports (
2 id int(11) NOT NULL auto_increment,
3 type varchar(255) NOT NULL,
4 report_name varchar(255) NOT NULL,
5 created_by varchar(255) NOT NULL,
6 created_at int NOT NULL DEFAULT 0,
7 updated_by varchar(255) NOT NULL,
8 updated_at int NOT NULL DEFAULT 0,
12 CREATE TABLE saved_reports_options (
13 report_id int(11) NOT NULL,
14 name varchar(255) NOT NULL,
16 PRIMARY KEY (report_id, name),
17 FOREIGN KEY (report_id) REFERENCES saved_reports (id)
20 CREATE TABLE saved_reports_objects (
21 report_id int(11) NOT NULL,
22 object_name varchar(255) NOT NULL,
23 PRIMARY KEY (report_id, object_name),
24 FOREIGN KEY (report_id) REFERENCES saved_reports (id)