1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-26 03:40:54 +03:00
kohana-migrations/migrations/kohana/minion/20110110093709_create-test-minion-migrations-table.php

35 lines
910 B
PHP

<?php defined('SYSPATH') or die('No direct script access.');
/**
* Create test_minion_migrations table
*/
class Migration_Kohana_Minion_20110110093709 extends Minion_Migration_Base {
/**
* Run queries needed to apply this migration
*
* @param Kohana_Database Database connection
*/
public function up(Kohana_Database $db)
{
$db->query(NULL, 'CREATE TABLE `test_minion_migrations` (
`timestamp` varchar(14) NOT NULL,
`description` varchar(100) NOT NULL,
`location` varchar(100) NOT NULL,
`applied` tinyint(1) DEFAULT \'0\',
PRIMARY KEY (`timestamp`,`location`),
UNIQUE KEY `MIGRATION_ID` (`timestamp`,`description`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;');
}
/**
* Run queries needed to remove this migration
*
* @param Kohana_Database Database connection
*/
public function down(Kohana_Database $db)
{
$db->query(NULL, 'DROP TABLE `test_minion_migrations`');
}
}