diff options
author | Aurélien <cadiou.aurelien@gmail.com> | 2018-04-02 23:07:04 +0200 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2018-04-02 14:07:04 -0700 |
commit | 5f7a3442d61b99e2fbad732bd0eaf9ad64398274 (patch) | |
tree | 78d2b159be9d2df92e28c90164430fdac2a4cac7 /app/Schema | |
parent | bc4457c4cb096a448d88ca882d30bae15aff56c3 (diff) |
Add default filter per user
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 | 1 | ||||
-rw-r--r-- | app/Schema/Sql/postgres.sql | 3 | ||||
-rw-r--r-- | app/Schema/Sqlite.php | 7 |
5 files changed, 21 insertions, 4 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 32171d17..b73ce8c0 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 127; +const VERSION = 128; + +function version_128(PDO $pdo) +{ + $pdo->exec('ALTER TABLE `users` ADD COLUMN `filter` VARCHAR(255) DEFAULT NULL'); +} function version_127(PDO $pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 8d5a68e5..50ea4850 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -8,7 +8,12 @@ use PDO; use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; -const VERSION = 106; +const VERSION = 107; + +function version_107(PDO $pdo) +{ + $pdo->exec('ALTER TABLE "users" ADD COLUMN filter VARCHAR(255) DEFAULT NULL'); +} function version_106(PDO $pdo) { diff --git a/app/Schema/Sql/mysql.sql b/app/Schema/Sql/mysql.sql index 37da98cc..199fd797 100644 --- a/app/Schema/Sql/mysql.sql +++ b/app/Schema/Sql/mysql.sql @@ -752,6 +752,7 @@ CREATE TABLE `users` ( `is_active` tinyint(1) DEFAULT '1', `avatar_path` varchar(255) DEFAULT NULL, `api_access_token` varchar(255) DEFAULT NULL, + `filter` varchar(255) DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_username_idx` (`username`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/app/Schema/Sql/postgres.sql b/app/Schema/Sql/postgres.sql index 1d45870a..e43248c3 100644 --- a/app/Schema/Sql/postgres.sql +++ b/app/Schema/Sql/postgres.sql @@ -1299,7 +1299,8 @@ CREATE TABLE "users" ( "role" character varying(25) DEFAULT 'app-user'::character varying NOT NULL, "is_active" boolean DEFAULT true, "avatar_path" character varying(255), - "api_access_token" character varying(255) DEFAULT NULL::character varying + "api_access_token" character varying(255) DEFAULT NULL::character varying, + "filter" character varying(255) DEFAULT NULL::character varying ); diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index e40b2aeb..aced61e0 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -8,7 +8,12 @@ use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Role; use PDO; -const VERSION = 117; +const VERSION = 118; + +function version_118(PDO $pdo) +{ + $pdo->exec('ALTER TABLE users ADD COLUMN filter VARCHAR(255) DEFAULT NULL'); +} function version_117(PDO $pdo) { |