diff options
author | Frederic Guillot <fred@kanboard.net> | 2016-02-28 09:01:50 -0500 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2016-02-28 09:01:50 -0500 |
commit | 8d71bbb1228fcfb3da80010c94b747cc56f739e2 (patch) | |
tree | cc399ebb4e6929330de9b0177e262fcd30283cd6 /app/Schema/Sql | |
parent | 60d5379bb4bb847fe4c1166f443ec1bd8aa32718 (diff) |
Update SQL dumps
Diffstat (limited to 'app/Schema/Sql')
-rw-r--r-- | app/Schema/Sql/mysql.sql | 56 | ||||
-rw-r--r-- | app/Schema/Sql/postgres.sql | 139 |
2 files changed, 135 insertions, 60 deletions
diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql index ef219490..b5620400 100644 --- a/app/Schema/Sql/mysql.sql +++ b/app/Schema/Sql/mysql.sql @@ -95,23 +95,6 @@ CREATE TABLE `custom_filters` ( CONSTRAINT `custom_filters_ibfk_2` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -DROP TABLE IF EXISTS `files`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `files` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `name` varchar(255) NOT NULL, - `path` varchar(255) DEFAULT NULL, - `is_image` tinyint(1) DEFAULT '0', - `task_id` int(11) NOT NULL, - `date` bigint(20) DEFAULT NULL, - `user_id` int(11) NOT NULL DEFAULT '0', - `size` int(11) NOT NULL DEFAULT '0', - PRIMARY KEY (`id`), - KEY `files_task_idx` (`task_id`), - CONSTRAINT `files_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `group_has_users`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -253,6 +236,23 @@ CREATE TABLE `project_has_categories` ( CONSTRAINT `project_has_categories_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `project_has_files`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `project_has_files` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `project_id` int(11) NOT NULL, + `name` varchar(255) NOT NULL, + `path` varchar(255) NOT NULL, + `is_image` tinyint(1) DEFAULT '0', + `size` int(11) NOT NULL DEFAULT '0', + `user_id` int(11) NOT NULL DEFAULT '0', + `date` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `project_id` (`project_id`), + CONSTRAINT `project_has_files_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `project_has_groups`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -428,6 +428,23 @@ CREATE TABLE `task_has_external_links` ( CONSTRAINT `task_has_external_links_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `task_has_files`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `task_has_files` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `name` varchar(255) NOT NULL, + `path` varchar(255) DEFAULT NULL, + `is_image` tinyint(1) DEFAULT '0', + `task_id` int(11) NOT NULL, + `date` bigint(20) DEFAULT NULL, + `user_id` int(11) NOT NULL DEFAULT '0', + `size` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `files_task_idx` (`task_id`), + CONSTRAINT `task_has_files_ibfk_1` FOREIGN KEY (`task_id`) REFERENCES `tasks` (`id`) ON DELETE CASCADE +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; DROP TABLE IF EXISTS `task_has_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -597,6 +614,7 @@ CREATE TABLE `users` ( `lock_expiration_date` bigint(20) DEFAULT NULL, `gitlab_id` int(11) DEFAULT NULL, `role` varchar(25) NOT NULL DEFAULT 'app-user', + `is_active` tinyint(1) DEFAULT '1', PRIMARY KEY (`id`), UNIQUE KEY `users_username_idx` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; @@ -620,7 +638,7 @@ CREATE TABLE `users` ( LOCK TABLES `settings` WRITE; /*!40000 ALTER TABLE `settings` DISABLE KEYS */; -INSERT INTO `settings` VALUES ('api_token','dcae89653bfd780f56a5c2ffabc54174bcdd877940e97eaa5d800b35df0c'),('application_currency','USD'),('application_date_format','m/d/Y'),('application_language','en_US'),('application_stylesheet',''),('application_timezone','UTC'),('application_url',''),('board_columns',''),('board_highlight_period','172800'),('board_private_refresh_interval','10'),('board_public_refresh_interval','60'),('calendar_project_tasks','date_started'),('calendar_user_subtasks_time_tracking','0'),('calendar_user_tasks','date_started'),('cfd_include_closed_tasks','1'),('default_color','yellow'),('integration_gravatar','0'),('password_reset','1'),('project_categories',''),('subtask_restriction','0'),('subtask_time_tracking','1'),('webhook_token','6c0a16d06e31add3ca1ca8713a69c6b410f72c80fd49cdfe27c4a62eef13'),('webhook_url',''); +INSERT INTO `settings` VALUES ('api_token','cd9c46c6bdaa6afc49b3385dabe0b78c059bc124b1f72c2f47c9ca604cf1'),('application_currency','USD'),('application_date_format','m/d/Y'),('application_language','en_US'),('application_stylesheet',''),('application_timezone','UTC'),('application_url',''),('board_columns',''),('board_highlight_period','172800'),('board_private_refresh_interval','10'),('board_public_refresh_interval','60'),('calendar_project_tasks','date_started'),('calendar_user_subtasks_time_tracking','0'),('calendar_user_tasks','date_started'),('cfd_include_closed_tasks','1'),('default_color','yellow'),('integration_gravatar','0'),('password_reset','1'),('project_categories',''),('subtask_restriction','0'),('subtask_time_tracking','1'),('webhook_token','32387b121de8fe6031a6b71b7b1b9cae411a909539aa9d494cf69ac5f2ee'),('webhook_url',''); /*!40000 ALTER TABLE `settings` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -649,4 +667,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$f6brAPgJ6iTtOWUMJANDuuRG.VWDH61.aCb5v3MJnSrZodhDaCcmy', 'app-admin');INSERT INTO schema_version VALUES ('104'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$tyByY1dfUO9S.2wpJcSMEO4UU9H.yCwf/pmzo430DM2C4QZ/K3Kt2', 'app-admin');INSERT INTO schema_version VALUES ('107'); diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql index 68415805..c613ddb4 100644 --- a/app/Schema/Sql/postgres.sql +++ b/app/Schema/Sql/postgres.sql @@ -202,22 +202,6 @@ ALTER SEQUENCE custom_filters_id_seq OWNED BY custom_filters.id; -- --- Name: files; Type: TABLE; Schema: public; Owner: -; Tablespace: --- - -CREATE TABLE files ( - id integer NOT NULL, - name character varying(255) NOT NULL, - path character varying(255), - is_image boolean DEFAULT false, - task_id integer NOT NULL, - date bigint DEFAULT 0 NOT NULL, - user_id integer DEFAULT 0 NOT NULL, - size integer DEFAULT 0 NOT NULL -); - - --- -- Name: group_has_users; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -476,6 +460,41 @@ ALTER SEQUENCE project_has_categories_id_seq OWNED BY project_has_categories.id; -- +-- Name: project_has_files; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- + +CREATE TABLE project_has_files ( + id integer NOT NULL, + project_id integer NOT NULL, + name character varying(255) NOT NULL, + path character varying(255) NOT NULL, + is_image boolean DEFAULT false, + size integer DEFAULT 0 NOT NULL, + user_id integer DEFAULT 0 NOT NULL, + date integer DEFAULT 0 NOT NULL +); + + +-- +-- Name: project_has_files_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE project_has_files_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: project_has_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE project_has_files_id_seq OWNED BY project_has_files.id; + + +-- -- Name: project_has_groups; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -756,6 +775,22 @@ ALTER SEQUENCE task_has_external_links_id_seq OWNED BY task_has_external_links.i -- +-- Name: task_has_files; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- + +CREATE TABLE task_has_files ( + id integer NOT NULL, + name character varying(255) NOT NULL, + path character varying(255), + is_image boolean DEFAULT false, + task_id integer NOT NULL, + date bigint DEFAULT 0 NOT NULL, + user_id integer DEFAULT 0 NOT NULL, + size integer DEFAULT 0 NOT NULL +); + + +-- -- Name: task_has_files_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- @@ -771,7 +806,7 @@ CREATE SEQUENCE task_has_files_id_seq -- Name: task_has_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - -- -ALTER SEQUENCE task_has_files_id_seq OWNED BY files.id; +ALTER SEQUENCE task_has_files_id_seq OWNED BY task_has_files.id; -- @@ -1034,7 +1069,8 @@ CREATE TABLE users ( nb_failed_login integer DEFAULT 0, lock_expiration_date bigint DEFAULT 0, gitlab_id integer, - role character varying(25) DEFAULT 'app-user'::character varying NOT NULL + role character varying(25) DEFAULT 'app-user'::character varying NOT NULL, + is_active boolean DEFAULT true ); @@ -1096,13 +1132,6 @@ ALTER TABLE ONLY custom_filters ALTER COLUMN id SET DEFAULT nextval('custom_filt -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- -ALTER TABLE ONLY files ALTER COLUMN id SET DEFAULT nextval('task_has_files_id_seq'::regclass); - - --- --- Name: id; Type: DEFAULT; Schema: public; Owner: - --- - ALTER TABLE ONLY groups ALTER COLUMN id SET DEFAULT nextval('groups_id_seq'::regclass); @@ -1152,6 +1181,13 @@ ALTER TABLE ONLY project_has_categories ALTER COLUMN id SET DEFAULT nextval('pro -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- +ALTER TABLE ONLY project_has_files ALTER COLUMN id SET DEFAULT nextval('project_has_files_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + ALTER TABLE ONLY project_has_notification_types ALTER COLUMN id SET DEFAULT nextval('project_has_notification_types_id_seq'::regclass); @@ -1201,6 +1237,13 @@ ALTER TABLE ONLY task_has_external_links ALTER COLUMN id SET DEFAULT nextval('ta -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- +ALTER TABLE ONLY task_has_files ALTER COLUMN id SET DEFAULT nextval('task_has_files_id_seq'::regclass); + + +-- +-- Name: id; Type: DEFAULT; Schema: public; Owner: - +-- + ALTER TABLE ONLY task_has_links ALTER COLUMN id SET DEFAULT nextval('task_has_links_id_seq'::regclass); @@ -1400,6 +1443,14 @@ ALTER TABLE ONLY project_has_categories -- +-- Name: project_has_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- + +ALTER TABLE ONLY project_has_files + ADD CONSTRAINT project_has_files_pkey PRIMARY KEY (id); + + +-- -- Name: project_has_groups_group_id_project_id_key; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- @@ -1488,10 +1539,18 @@ ALTER TABLE ONLY swimlanes -- +-- Name: task_has_external_links_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- + +ALTER TABLE ONLY task_has_external_links + ADD CONSTRAINT task_has_external_links_pkey PRIMARY KEY (id); + + +-- -- Name: task_has_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- -ALTER TABLE ONLY files +ALTER TABLE ONLY task_has_files ADD CONSTRAINT task_has_files_pkey PRIMARY KEY (id); @@ -1607,7 +1666,7 @@ CREATE INDEX comments_task_idx ON comments USING btree (task_id); -- Name: files_task_idx; Type: INDEX; Schema: public; Owner: -; Tablespace: -- -CREATE INDEX files_task_idx ON files USING btree (task_id); +CREATE INDEX files_task_idx ON task_has_files USING btree (task_id); -- @@ -1822,6 +1881,14 @@ ALTER TABLE ONLY project_has_categories -- +-- Name: project_has_files_project_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY project_has_files + ADD CONSTRAINT project_has_files_project_id_fkey FOREIGN KEY (project_id) REFERENCES projects(id) ON DELETE CASCADE; + + +-- -- Name: project_has_groups_group_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -1913,7 +1980,7 @@ ALTER TABLE ONLY task_has_external_links -- Name: task_has_files_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- -ALTER TABLE ONLY files +ALTER TABLE ONLY task_has_files ADD CONSTRAINT task_has_files_task_id_fkey FOREIGN KEY (task_id) REFERENCES tasks(id) ON DELETE CASCADE; @@ -2054,16 +2121,6 @@ ALTER TABLE ONLY user_has_unread_notifications -- --- Name: public; Type: ACL; Schema: -; Owner: - --- - -REVOKE ALL ON SCHEMA public FROM PUBLIC; -REVOKE ALL ON SCHEMA public FROM fred; -GRANT ALL ON SCHEMA public TO fred; -GRANT ALL ON SCHEMA public TO PUBLIC; - - --- -- PostgreSQL database dump complete -- @@ -2088,8 +2145,8 @@ INSERT INTO settings (option, value) VALUES ('board_highlight_period', '172800') INSERT INTO settings (option, value) VALUES ('board_public_refresh_interval', '60'); INSERT INTO settings (option, value) VALUES ('board_private_refresh_interval', '10'); INSERT INTO settings (option, value) VALUES ('board_columns', ''); -INSERT INTO settings (option, value) VALUES ('webhook_token', '083531659240f36021edc73a4ed3920646ef8798b798c5894e2277f048a2'); -INSERT INTO settings (option, value) VALUES ('api_token', 'b97b4abc7e8f0e0569bdad8cb54f7fb1931615932e552fa255f87a3e1360'); +INSERT INTO settings (option, value) VALUES ('webhook_token', 'c7caaf8f87ad391800e3989d7abfd98a6066a6f801fc151012bb5c4ee3cb'); +INSERT INTO settings (option, value) VALUES ('api_token', 'b0a6f56fe236fc9639fc6914e92365aa627d95cd790aa7e0c5a3ebebf844'); INSERT INTO settings (option, value) VALUES ('application_language', 'en_US'); INSERT INTO settings (option, value) VALUES ('application_timezone', 'UTC'); INSERT INTO settings (option, value) VALUES ('application_url', ''); @@ -2154,4 +2211,4 @@ SELECT pg_catalog.setval('links_id_seq', 11, true); -- PostgreSQL database dump complete -- -INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$f6brAPgJ6iTtOWUMJANDuuRG.VWDH61.aCb5v3MJnSrZodhDaCcmy', 'app-admin');INSERT INTO schema_version VALUES ('84'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$tyByY1dfUO9S.2wpJcSMEO4UU9H.yCwf/pmzo430DM2C4QZ/K3Kt2', 'app-admin');INSERT INTO schema_version VALUES ('87'); |