diff --git a/src/IDF/Migrations/19IssueDueDate.php b/src/IDF/Migrations/19IssueDueDate.php deleted file mode 100644 index 8cf809f..0000000 --- a/src/IDF/Migrations/19IssueDueDate.php +++ /dev/null @@ -1,55 +0,0 @@ -getSqlTable(); - $sql = array(); - $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ADD COLUMN "due_dtime" DATETIME'; - $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_19IssueDueDate_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]); - -} \ No newline at end of file diff --git a/src/IDF/Migrations/25IssueDueDate.php b/src/IDF/Migrations/25IssueDueDate.php new file mode 100644 index 0000000..6677219 --- /dev/null +++ b/src/IDF/Migrations/25IssueDueDate.php @@ -0,0 +1,55 @@ +getSqlTable(); + $sql = array(); + $sql['PostgreSQL'] = 'ALTER TABLE '.$table.' ADD COLUMN "due_dtime" DATETIME'; + $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]); + +}