diff options
Diffstat (limited to 'app/Schema/Sql')
-rw-r--r-- | app/Schema/Sql/mysql.sql | 49 | ||||
-rw-r--r-- | app/Schema/Sql/postgres.sql | 104 |
2 files changed, 140 insertions, 13 deletions
diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql index 4b26aec7..ef219490 100644 --- a/app/Schema/Sql/mysql.sql +++ b/app/Schema/Sql/mysql.sql @@ -29,7 +29,7 @@ CREATE TABLE `actions` ( `id` int(11) NOT NULL AUTO_INCREMENT, `project_id` int(11) NOT NULL, `event_name` varchar(50) NOT NULL, - `action_name` varchar(50) NOT NULL, + `action_name` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), KEY `project_id` (`project_id`), CONSTRAINT `actions_ibfk_1` FOREIGN KEY (`project_id`) REFERENCES `projects` (`id`) ON DELETE CASCADE @@ -142,7 +142,7 @@ CREATE TABLE `last_logins` ( `id` int(11) NOT NULL AUTO_INCREMENT, `auth_type` varchar(25) DEFAULT NULL, `user_id` int(11) DEFAULT NULL, - `ip` varchar(40) DEFAULT NULL, + `ip` varchar(45) DEFAULT NULL, `user_agent` varchar(255) DEFAULT NULL, `date_creation` bigint(20) DEFAULT NULL, PRIMARY KEY (`id`), @@ -161,6 +161,22 @@ CREATE TABLE `links` ( UNIQUE KEY `label` (`label`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; +DROP TABLE IF EXISTS `password_reset`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `password_reset` ( + `token` varchar(80) NOT NULL, + `user_id` int(11) NOT NULL, + `date_expiration` int(11) NOT NULL, + `date_creation` int(11) NOT NULL, + `ip` varchar(45) NOT NULL, + `user_agent` varchar(255) NOT NULL, + `is_active` tinyint(1) NOT NULL, + PRIMARY KEY (`token`), + KEY `user_id` (`user_id`), + CONSTRAINT `password_reset_ibfk_1` 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 `plugin_schema_versions`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -304,6 +320,10 @@ CREATE TABLE `projects` ( `identifier` varchar(50) DEFAULT '', `start_date` varchar(10) DEFAULT '', `end_date` varchar(10) DEFAULT '', + `owner_id` int(11) DEFAULT '0', + `priority_default` int(11) DEFAULT '0', + `priority_start` int(11) DEFAULT '0', + `priority_end` int(11) DEFAULT '3', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -313,7 +333,7 @@ DROP TABLE IF EXISTS `remember_me`; CREATE TABLE `remember_me` ( `id` int(11) NOT NULL AUTO_INCREMENT, `user_id` int(11) DEFAULT NULL, - `ip` varchar(40) DEFAULT NULL, + `ip` varchar(45) DEFAULT NULL, `user_agent` varchar(255) DEFAULT NULL, `token` varchar(255) DEFAULT NULL, `sequence` varchar(255) DEFAULT NULL, @@ -390,6 +410,24 @@ CREATE TABLE `swimlanes` ( CONSTRAINT `swimlanes_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 `task_has_external_links`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `task_has_external_links` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `link_type` varchar(100) NOT NULL, + `dependency` varchar(100) NOT NULL, + `title` varchar(255) NOT NULL, + `url` varchar(255) NOT NULL, + `date_creation` int(11) NOT NULL, + `date_modification` int(11) NOT NULL, + `task_id` int(11) NOT NULL, + `creator_id` int(11) DEFAULT '0', + PRIMARY KEY (`id`), + KEY `task_id` (`task_id`), + 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_links`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; @@ -451,6 +489,7 @@ CREATE TABLE `tasks` ( `recurrence_basedate` int(11) NOT NULL DEFAULT '0', `recurrence_parent` int(11) DEFAULT NULL, `recurrence_child` int(11) DEFAULT NULL, + `priority` int(11) DEFAULT '0', PRIMARY KEY (`id`), KEY `idx_task_active` (`is_active`), KEY `column_id` (`column_id`), @@ -581,7 +620,7 @@ CREATE TABLE `users` ( LOCK TABLES `settings` WRITE; /*!40000 ALTER TABLE `settings` DISABLE KEYS */; -INSERT INTO `settings` VALUES ('api_token','a5ee9b5e8a97d1da2b725d5f3d66caec8b5fe195968c33f8081badd17c35'),('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'),('project_categories',''),('subtask_restriction','0'),('subtask_time_tracking','1'),('webhook_token','bb74b2b3d79f562520d1f495b6c0c1f9ff1d996d1d60374fd67b47637239'),('webhook_url',''); +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',''); /*!40000 ALTER TABLE `settings` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -610,4 +649,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$EIYcgiDba33chGTqlP4cYeXSF7WC5RJPr8eMGsx.8gVT1Q4OUgkay', 'app-admin');INSERT INTO schema_version VALUES ('98'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$f6brAPgJ6iTtOWUMJANDuuRG.VWDH61.aCb5v3MJnSrZodhDaCcmy', 'app-admin');INSERT INTO schema_version VALUES ('104'); diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql index bca9dd73..68415805 100644 --- a/app/Schema/Sql/postgres.sql +++ b/app/Schema/Sql/postgres.sql @@ -68,7 +68,7 @@ CREATE TABLE actions ( id integer NOT NULL, project_id integer NOT NULL, event_name character varying(50) NOT NULL, - action_name character varying(50) NOT NULL + action_name character varying(255) NOT NULL ); @@ -265,7 +265,7 @@ CREATE TABLE last_logins ( id integer NOT NULL, auth_type character varying(25), user_id integer, - ip character varying(40), + ip character varying(45), user_agent character varying(255), date_creation bigint ); @@ -321,6 +321,21 @@ ALTER SEQUENCE links_id_seq OWNED BY links.id; -- +-- Name: password_reset; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- + +CREATE TABLE password_reset ( + token character varying(80) NOT NULL, + user_id integer NOT NULL, + date_expiration integer NOT NULL, + date_creation integer NOT NULL, + ip character varying(45) NOT NULL, + user_agent character varying(255) NOT NULL, + is_active boolean NOT NULL +); + + +-- -- Name: plugin_schema_versions; Type: TABLE; Schema: public; Owner: -; Tablespace: -- @@ -541,7 +556,11 @@ CREATE TABLE projects ( description text, identifier character varying(50) DEFAULT ''::character varying, start_date character varying(10) DEFAULT ''::character varying, - end_date character varying(10) DEFAULT ''::character varying + end_date character varying(10) DEFAULT ''::character varying, + owner_id integer DEFAULT 0, + priority_default integer DEFAULT 0, + priority_start integer DEFAULT 0, + priority_end integer DEFAULT 3 ); @@ -571,7 +590,7 @@ ALTER SEQUENCE projects_id_seq OWNED BY projects.id; CREATE TABLE remember_me ( id integer NOT NULL, user_id integer, - ip character varying(40), + ip character varying(45), user_agent character varying(255), token character varying(255), sequence character varying(255), @@ -701,6 +720,42 @@ ALTER SEQUENCE swimlanes_id_seq OWNED BY swimlanes.id; -- +-- Name: task_has_external_links; Type: TABLE; Schema: public; Owner: -; Tablespace: +-- + +CREATE TABLE task_has_external_links ( + id integer NOT NULL, + link_type character varying(100) NOT NULL, + dependency character varying(100) NOT NULL, + title character varying(255) NOT NULL, + url character varying(255) NOT NULL, + date_creation integer NOT NULL, + date_modification integer NOT NULL, + task_id integer NOT NULL, + creator_id integer DEFAULT 0 +); + + +-- +-- Name: task_has_external_links_id_seq; Type: SEQUENCE; Schema: public; Owner: - +-- + +CREATE SEQUENCE task_has_external_links_id_seq + START WITH 1 + INCREMENT BY 1 + NO MINVALUE + NO MAXVALUE + CACHE 1; + + +-- +-- Name: task_has_external_links_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: - +-- + +ALTER SEQUENCE task_has_external_links_id_seq OWNED BY task_has_external_links.id; + + +-- -- Name: task_has_files_id_seq; Type: SEQUENCE; Schema: public; Owner: - -- @@ -813,7 +868,8 @@ CREATE TABLE tasks ( recurrence_timeframe integer DEFAULT 0 NOT NULL, recurrence_basedate integer DEFAULT 0 NOT NULL, recurrence_parent integer, - recurrence_child integer + recurrence_child integer, + priority integer DEFAULT 0 ); @@ -1138,6 +1194,13 @@ ALTER TABLE ONLY swimlanes ALTER COLUMN id SET DEFAULT nextval('swimlanes_id_seq -- Name: id; Type: DEFAULT; Schema: public; Owner: - -- +ALTER TABLE ONLY task_has_external_links ALTER COLUMN id SET DEFAULT nextval('task_has_external_links_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); @@ -1281,6 +1344,14 @@ ALTER TABLE ONLY links -- +-- Name: password_reset_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: +-- + +ALTER TABLE ONLY password_reset + ADD CONSTRAINT password_reset_pkey PRIMARY KEY (token); + + +-- -- Name: plugin_schema_versions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace: -- @@ -1687,6 +1758,14 @@ ALTER TABLE ONLY last_logins -- +-- Name: password_reset_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY password_reset + ADD CONSTRAINT password_reset_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE; + + +-- -- Name: project_activities_creator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -1823,6 +1902,14 @@ ALTER TABLE ONLY swimlanes -- +-- Name: task_has_external_links_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY task_has_external_links + ADD CONSTRAINT task_has_external_links_task_id_fkey FOREIGN KEY (task_id) REFERENCES tasks(id) ON DELETE CASCADE; + + +-- -- Name: task_has_files_task_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -2001,8 +2088,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', '686b427497298001641d9d300d53b0b23da6a4a2cc0ce17d24d346219fca'); -INSERT INTO settings (option, value) VALUES ('api_token', '3387e930ebe3984d59eac1fb07bb112916c846cfe2f01b513349c24fc045'); +INSERT INTO settings (option, value) VALUES ('webhook_token', '083531659240f36021edc73a4ed3920646ef8798b798c5894e2277f048a2'); +INSERT INTO settings (option, value) VALUES ('api_token', 'b97b4abc7e8f0e0569bdad8cb54f7fb1931615932e552fa255f87a3e1360'); 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', ''); @@ -2019,6 +2106,7 @@ INSERT INTO settings (option, value) VALUES ('webhook_url', ''); INSERT INTO settings (option, value) VALUES ('default_color', 'yellow'); INSERT INTO settings (option, value) VALUES ('subtask_time_tracking', '1'); INSERT INTO settings (option, value) VALUES ('cfd_include_closed_tasks', '1'); +INSERT INTO settings (option, value) VALUES ('password_reset', '1'); -- @@ -2066,4 +2154,4 @@ SELECT pg_catalog.setval('links_id_seq', 11, true); -- PostgreSQL database dump complete -- -INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$EIYcgiDba33chGTqlP4cYeXSF7WC5RJPr8eMGsx.8gVT1Q4OUgkay', 'app-admin');INSERT INTO schema_version VALUES ('78'); +INSERT INTO users (username, password, role) VALUES ('admin', '$2y$10$f6brAPgJ6iTtOWUMJANDuuRG.VWDH61.aCb5v3MJnSrZodhDaCcmy', 'app-admin');INSERT INTO schema_version VALUES ('84'); |