diff --git a/src/IDF/Migrations/25IssueDueDate.php b/src/IDF/Migrations/25IssueDueDate.php deleted file mode 100644 index ca02914..0000000 --- a/src/IDF/Migrations/25IssueDueDate.php +++ /dev/null @@ -1,55 +0,0 @@ -getSqlTable(); - $sql = array(); - $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ADD COLUMN "due_dtime" TIMESTAMP'; - $sql['MySQL'] = 'ALTER TABLE '.$table.' ADD COLUMN `due_dtime` DATETIME'; - $db = Pluf::db(); - $engine = Pluf::f('db_engine'); - if (!isset($sql[$engine])) { - throw new Exception('SQLite complex migration not supported.'); - } - $db->execute($sql[$engine]); -} - -function IDF_Migrations_25IssueDueDate_down($params=null) -{ - $table = Pluf::factory('IDF_Issue')->getSqlTable(); - $sql = array(); - $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' DROP COLUMN "due_dtime"'; - $sql['MySQL'] = 'ALTER TABLE '.$table.' DROP COLUMN `due_dtime`'; - $db = Pluf::db(); - $engine = Pluf::f('db_engine'); - if (!isset($sql[$engine])) { - throw new Exception('SQLite complex migration not supported.'); - } - $db->execute($sql[$engine]); - -} diff --git a/src/IDF/Migrations/26IssueDueDate.php b/src/IDF/Migrations/26IssueDueDate.php new file mode 100644 index 0000000..becc3ab --- /dev/null +++ b/src/IDF/Migrations/26IssueDueDate.php @@ -0,0 +1,55 @@ +getSqlTable(); + $sql = array(); + $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ADD COLUMN "due_dtime" TIMESTAMP'; + $sql['MySQL'] = 'ALTER TABLE '.$table.' ADD COLUMN `due_dtime` DATETIME'; + $db = Pluf::db(); + $engine = Pluf::f('db_engine'); + if (!isset($sql[$engine])) { + throw new Exception('SQLite complex migration not supported.'); + } + $db->execute($sql[$engine]); +} + +function IDF_Migrations_26IssueDueDate_down($params=null) +{ + $table = Pluf::factory('IDF_Issue')->getSqlTable(); + $sql = array(); + $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' DROP COLUMN "due_dtime"'; + $sql['MySQL'] = 'ALTER TABLE '.$table.' DROP COLUMN `due_dtime`'; + $db = Pluf::db(); + $engine = Pluf::f('db_engine'); + if (!isset($sql[$engine])) { + throw new Exception('SQLite complex migration not supported.'); + } + $db->execute($sql[$engine]); + +}