1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-05-05 02:28:16 +03:00
Commit graph

178 commits

Author SHA1 Message Date
Matt Button d164f69f6a Added db/model setters to the migration manager 2010-12-29 04:26:43 +00:00
Matt Button a127951df7 Fixing typo in function call in Migration manager 2010-12-29 03:30:36 +00:00
Matt Button fbe91010ed Migration IDs are now {location}:{timestamp}
This should force uniqueness of migration ids
2010-12-29 03:03:00 +00:00
Matt Button 181e2d7b67 Making it easier to pass data into db:migrate task outside of the cli 2010-12-29 02:19:21 +00:00
Matt Button 0a2863ae9a Filling out the environment config option in db:migrate 2010-12-29 01:17:51 +00:00
Matt Button c026cbb415 Limiting command line to executing a single task.
This reduces both the complexity for the end user (no pesky task namespace on config options)
and also removes a good few LOC

Minion_Master has been removed in favour of Controller_Minion + Minion_Test::factory()
2010-12-29 01:01:32 +00:00
Matt Button e64ce18a71 Changing model methods so they return an array instead of a database result 2010-12-29 00:46:07 +00:00
Matt Button 2bbd092572 Changing tasks so that allowed config options are stored in member variables 2010-12-29 00:43:45 +00:00
Matt Button 114540af40 Fleshed out the manager code for running migrations 2010-12-28 23:23:36 +00:00
Matt Button 1d3e2343c9 Renaming some methods and changing get_filename_from_migration() so it doesn't prepend migrations/ 2010-12-28 23:23:01 +00:00
Matt Button 76f50ab4b9 Change migration manager to allow an instance of Model_Minion_Migration to be injected 2010-12-28 17:51:17 +00:00
Matt Button 14ac8a4047 Migration model wasn't using correct target version when downgrading all locations. Adding a bugfix & test 2010-12-28 17:40:40 +00:00
Matt Button 5fd227becd Added unit tests for migration model and fixed some bugs found with the tests :) 2010-12-28 15:40:54 +00:00
Matt Button ae36d5d947 Added some more info to the documentation 2010-12-28 05:29:58 +00:00
Matt Button 336c6506f3 Implemented code to parse user input on cli and pass it to migration manager 2010-12-28 05:03:03 +00:00
Matt Button 1207916227 Updated the migration manager with some comments relevant to the previous commit 2010-12-28 05:02:27 +00:00
Matt Button 66b3297c34 Bit of cleanup, also added a third param to specify default migration direction, and also merge targets with locations if targets is an array 2010-12-28 05:01:22 +00:00
Matt Button 9e6cfc6a59 Fixed a few bugs and added sensible funtionality:
* Fixed a bug where already appled migrations would be selected when asked to bring a location up to latest version
* You can now use booleans to get migrations needed to migrate to one of two extremes (TRUE = latest, FALSE = undo everything)
* If you're rolling back to a version then you don't want to execute the down() for that migration
2010-12-28 03:29:57 +00:00
Matt Button 8cadcbf309 Renaming 'module' to 'location' in migration related code, makes more sense 2010-12-28 02:47:49 +00:00
Matt Button 9b0e6d7555 Updated one of the comments in the migrations model 2010-12-25 03:21:43 +00:00
Matt Button 99046c117e Noticed a couple of bugs with query generation in the migration model, namely:
* Migrations were only being fetched when target explicitly defined
* Results weren't being ordered properly
* There was no way to tell the calling code which method (i.e. up / down) should be called on migrations
2010-12-25 03:16:50 +00:00
Matt Button afe039fb4e Fixed a bug in the migration model where migrations that hadn't already
been applied would be selected during rollback.
2010-12-25 03:00:34 +00:00
Matt Button 76b0533072 Added migrations model for interacting with data in migrations table
Can currently

* Get all migrations
* Fetch the current version for each "module"
* Get a list of migrations that need to be run to bring the db up to date
2010-12-25 02:52:51 +00:00
Matt Button 270a4e93e9 Adding a migration manger, no tests as of yet 2010-12-24 17:54:23 +00:00
Matt Button 457321b0cc Added a note to the documentation running only minion tests 2010-12-24 17:39:11 +00:00
Matt Button 82ba3323d6 Added some utility methods for managing migrations, includes tests 2010-12-24 17:37:52 +00:00
Matt Button ff99409974 Modifying base migration to accept a database connection in up() and down() 2010-12-24 17:35:17 +00:00
Matt Button ed98d5b7c8 Initial import 2010-12-24 15:52:03 +00:00