Change comments table structure (drop foreign key on user_id)

This commit is contained in:
Frederic Guillot
2015-06-20 17:53:49 -04:00
parent b6b733b22f
commit 22b26d0b4d
8 changed files with 96 additions and 14 deletions

View File

@@ -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)
{