diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-10-05 19:40:57 -0400 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-10-05 19:40:57 -0400 |
commit | d138834dcf902534f78237939926e97fd9a0eebe (patch) | |
tree | a6247b9ed98079899c9e21d43044030b69088bee /app/Schema | |
parent | 7f5a871f84639a90eebd0ac1d0ee7f759e220cf6 (diff) |
Regular users are able to create private projects
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/Sqlite.php | 7 |
3 files changed, 18 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 8b6ba5ae..ab618635 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -5,7 +5,12 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 30; +const VERSION = 31; + +function version_31($pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN is_private TINYINT(1) DEFAULT '0'"); +} function version_30($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 90a3da40..fe2cce54 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -5,7 +5,12 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 11; +const VERSION = 12; + +function version_12($pdo) +{ + $pdo->exec("ALTER TABLE projects ADD COLUMN is_private BOOLEAN DEFAULT '0'"); +} function version_11($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index b39532f1..cefe8ab5 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -5,7 +5,12 @@ namespace Schema; use Core\Security; use PDO; -const VERSION = 30; +const VERSION = 31; + +function version_31($pdo) +{ + $pdo->exec('ALTER TABLE projects ADD COLUMN is_private INTEGER DEFAULT "0"'); +} function version_30($pdo) { |