From d9bc6f6cb7fb74582dab3889c7e4272f0b0e76e1 Mon Sep 17 00:00:00 2001 From: Matt Button Date: Mon, 10 Jan 2011 14:15:07 +0000 Subject: [PATCH] Adding table() method to migrations model --- classes/model/minion/migration.php | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/classes/model/minion/migration.php b/classes/model/minion/migration.php index 395f566..7c5c031 100644 --- a/classes/model/minion/migration.php +++ b/classes/model/minion/migration.php @@ -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