diff options
author | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 10:05:44 -0500 |
---|---|---|
committer | Frédéric Guillot <fred@kanboard.net> | 2014-11-22 10:05:44 -0500 |
commit | 15038cdb10f8c691edc7980fd1aed32dcbed3f9f (patch) | |
tree | ebdf873e5c65616c3fd36ea2c7a449da52a61877 /app/Schema | |
parent | 8f0e544cd91b24423951bbb5d3f3be0950a63abe (diff) |
Move task creation to a seperate class
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 | 2 |
3 files changed, 13 insertions, 3 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index e73f6cf4..52dbea50 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -5,7 +5,12 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 35; +const VERSION = 36; + +function version_36($pdo) +{ + $pdo->exec('ALTER TABLE tasks MODIFY title VARCHAR(255) NOT NULL'); +} function version_35($pdo) { diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php index 4ec3885c..9493e60e 100644 --- a/app/Schema/Postgres.php +++ b/app/Schema/Postgres.php @@ -5,7 +5,12 @@ namespace Schema; use PDO; use Core\Security; -const VERSION = 16; +const VERSION = 17; + +function version_17($pdo) +{ + $pdo->exec('ALTER TABLE tasks ALTER COLUMN title SET NOT NULL'); +} function version_16($pdo) { diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index cdc74465..82c2f41c 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -457,7 +457,7 @@ function version_1($pdo) $pdo->exec(" CREATE TABLE tasks ( id INTEGER PRIMARY KEY, - title TEXT, + title TEXT NOT NULL, description TEXT, date_creation INTEGER, color_id TEXT, |