2010-12-24 17:52:03 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The base migration class, must be extended by all migration files
|
|
|
|
*
|
|
|
|
* Each migration file must implement an up() and a down() which are used to
|
|
|
|
* apply / remove this migration from the schema respectively
|
|
|
|
*
|
|
|
|
* @author Matt Button <matthew@sigswitch.com>
|
|
|
|
*/
|
|
|
|
abstract class Minion_Migration_Base {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Runs any SQL queries necessary to bring the database up a migration version
|
|
|
|
*
|
2010-12-24 19:35:17 +02:00
|
|
|
* @param Kohana_Database The database connection to perform actions on
|
2010-12-24 17:52:03 +02:00
|
|
|
*/
|
2010-12-24 19:35:17 +02:00
|
|
|
abstract public function up(Kohana_Database $db);
|
2010-12-24 17:52:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Runs any SQL queries necessary to bring the database schema down a version
|
|
|
|
*
|
2010-12-24 19:35:17 +02:00
|
|
|
* @param Kohana_Database The database connection to perform actions on
|
2010-12-24 17:52:03 +02:00
|
|
|
*/
|
2010-12-24 19:35:17 +02:00
|
|
|
abstract public function down(Kohana_Database $db);
|
2010-12-24 17:52:03 +02:00
|
|
|
}
|