mirror of
https://github.com/Oreolek/kohana-migrations.git
synced 2024-05-24 11:58:11 +03:00
Adding table() method to migrations model
This commit is contained in:
parent
36646106e8
commit
d9bc6f6cb7
|
@ -28,6 +28,24 @@ class Model_Minion_Migration extends Model
|
|||
$this->_db = $db;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get or Set the table to use to store migrations
|
||||
*
|
||||
* Should only really be used during testing
|
||||
*
|
||||
* @param string Table name
|
||||
* @return string|Model_Minion_Migration Get table name or return $this on set
|
||||
*/
|
||||
public function table($table = NULL)
|
||||
{
|
||||
if($table === NULL)
|
||||
return $this->_table;
|
||||
|
||||
$this->_table = $table;
|
||||
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new select query which includes all fields in the migrations
|
||||
* table plus a `id` field which is a combination of the timestamp and the
|
||||
|
|
Loading…
Reference in a new issue