diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-06-20 17:53:49 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-06-20 17:53:49 -0400 |
commit | 22b26d0b4d68f0492275ec93eb4df1a975a8fc80 (patch) | |
tree | a588fd826ce48ea6c7ce6f3da3259f8ea6204726 /app/Schema/Mysql.php | |
parent | b6b733b22f9e9f38786166c1274b135a99bce02a (diff) |
Change comments table structure (drop foreign key on user_id)
Diffstat (limited to 'app/Schema/Mysql.php')
-rw-r--r-- | app/Schema/Mysql.php | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php index 21b7a4de..34a609cf 100644 --- a/app/Schema/Mysql.php +++ b/app/Schema/Mysql.php @@ -6,7 +6,15 @@ use PDO; use Core\Security; use Model\Link; -const VERSION = 74; +const VERSION = 75; + +function version_75($pdo) +{ + $pdo->exec('ALTER TABLE comments DROP FOREIGN KEY comments_ibfk_2'); + $pdo->exec('ALTER TABLE comments MODIFY task_id INT NOT NULL'); + $pdo->exec('ALTER TABLE comments CHANGE COLUMN `user_id` `user_id` INT DEFAULT 0'); + $pdo->exec('ALTER TABLE comments CHANGE COLUMN `date` `date_creation` INT NOT NULL'); +} function version_74($pdo) { |