diff options
Diffstat (limited to 'app/Schema')
-rw-r--r-- | app/Schema/Mysql.php | 7 | ||||
-rw-r--r-- | app/Schema/Postgres.php | 7 | ||||
-rw-r--r-- | app/Schema/Sql/mysql.sql | 4 | ||||
-rw-r--r-- | app/Schema/Sql/postgres.sql | 4 |
4 files changed, 16 insertions, 6 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index ac97e224..3bdcc5e4 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 97; +const VERSION = 98; + +function version_98(PDO $pdo) +{ + $pdo->exec('ALTER TABLE `users` MODIFY `language` VARCHAR(5)'); +} function version_97(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 66d9acc1..23ed8405 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -6,7 +6,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 77; +const VERSION = 78; + +function version_78(PDO $pdo) +{ + $pdo->exec('ALTER TABLE "users" ALTER COLUMN "language" TYPE VARCHAR(5)'); +} function version_77(PDO $pdo) { diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql index 2c5ec989..b2c3ef94 100644 --- a/app/Schema/Sql/mysql.sql +++ b/app/Schema/Sql/mysql.sql @@ -548,7 +548,7 @@ CREATE TABLE `users` ( `github_id` varchar(30) DEFAULT NULL, `notifications_enabled` tinyint(1) DEFAULT '0', `timezone` varchar(50) DEFAULT NULL, - `language` char(5) DEFAULT NULL, + `language` varchar(5) DEFAULT NULL, `disable_login_form` tinyint(1) DEFAULT '0', `twofactor_activated` tinyint(1) DEFAULT '0', `twofactor_secret` char(16) DEFAULT NULL, @@ -610,4 +610,4 @@ UNLOCK TABLES; /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; -INSERT INTO users (username, password, is_admin) VALUES ('admin', '$2y$10$fe3.kkCOOiOxf21QW0tEUOCo5hsL19ct4YUumL.xxTnKKMbJCUb/y', '1');INSERT INTO schema_version VALUES ('97'); +INSERT INTO users (username, password, is_admin) VALUES ('admin', '$2y$10$/kXBPSpWZHnF6potELbOmuih3XlwgWHQr7dAVDHpIo96wVB22OtkO', '1');INSERT INTO schema_version VALUES ('98'); diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql index 63148955..800b620b 100644 --- a/app/Schema/Sql/postgres.sql +++ b/app/Schema/Sql/postgres.sql @@ -969,7 +969,7 @@ CREATE TABLE users ( github_id character varying(30), notifications_enabled boolean DEFAULT false, timezone character varying(50), - language character(5), + language character varying(5), disable_login_form boolean DEFAULT false, twofactor_activated boolean DEFAULT false, twofactor_secret character(16), @@ -2066,4 +2066,4 @@ SELECT pg_catalog.setval('links_id_seq', 11, true); -- PostgreSQL database dump complete -- -INSERT INTO users (username, password, is_admin) VALUES ('admin', '$2y$10$fe3.kkCOOiOxf21QW0tEUOCo5hsL19ct4YUumL.xxTnKKMbJCUb/y', '1');INSERT INTO schema_version VALUES ('77'); +INSERT INTO users (username, password, is_admin) VALUES ('admin', '$2y$10$/kXBPSpWZHnF6potELbOmuih3XlwgWHQr7dAVDHpIo96wVB22OtkO', '1');INSERT INTO schema_version VALUES ('78'); |