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:
parent
4edd40a245
commit
ade890c38c
28
application/migrations/kangana/20140219171312.php
Normal file
28
application/migrations/kangana/20140219171312.php
Normal 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');
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue