1
0
Fork 0
mirror of https://github.com/Oreolek/kangana.git synced 2024-06-16 15:01:09 +03:00

auto increment db

This commit is contained in:
Alexander Yakovlev 2014-02-21 13:53:25 +07:00
parent 4edd40a245
commit ade890c38c

View file

@ -0,0 +1,28 @@
<?php defined('SYSPATH') OR die('No direct script access.');
/**
* Auto increment migration
**/
class Migration_Kangana_20140219171312 extends Minion_Migration_Base {
/**
* Run queries needed to apply this migration
*
* @param Kohana_Database $db Database connection
*/
public function up(Kohana_Database $db)
{
$db->query(NULL, 'alter table `clients_subscriptions` modify column `id` int(11) not null auto_increment FIRST');
}
/**
* Run queries needed to remove this migration
*
* @param Kohana_Database $db Database connection
*/
public function down(Kohana_Database $db)
{
$db->query(NULL, 'alter table `clients_subscriptions` modify column `id` int(11) not null FIRST');
}
}