1
0
Fork 0
mirror of https://github.com/Oreolek/kohana-migrations.git synced 2024-06-26 03:40:54 +03:00
Commit graph

30 commits

Author SHA1 Message Date
Jeremy Bush b55a258760 Fix bug where migrations to +/- would not work properly. Fixes #16 2011-05-12 14:52:00 -05:00
Lorenzo Pisani 3e4edb1c0f fixes #13 (fetch_current_versions fails when there are none that have been applied yet) 2011-03-02 14:30:30 -07:00
Matt Button e42be14cc6 Refactored the migrate view & removed some var_dump calls 2011-02-18 02:20:47 +00:00
Matt Button fd690e6494 Rewrite of the core migrations system is pretty much complete, fixes #4 2011-02-18 02:20:05 +00:00
Matt Button 42001496eb Adding tests for/fixing fetch_required_migrations() / resolve_target() 2011-02-17 23:53:15 +00:00
Matt Button e0fe87f443 Starting to refactor stuff.
Renaming locations -> groups
Cut down the size of fetch_required_migrations()
2011-02-17 20:43:04 +00:00
Matt Button 8c92824af1 Adding syspath checks to files 2011-01-31 17:38:04 +00:00
Matt Button 8fc8ea440e Updating code to follow kohana coding standards 2011-01-31 17:28:58 +00:00
Matt Button 5648f47110 Ensure the migrations table exists before running migrations, fixes #9 2011-01-21 01:18:08 +00:00
Matt Button f4538e6713 Moving logic for searching for available migrations into the model
Also added a method for getting the status of all locations, regaurdless of whether they're installed.
2011-01-20 23:53:59 +00:00
Matt Button 973a1d10ea Namespacing the migrations table, fixes #10 2011-01-20 23:12:06 +00:00
Matt Button d9bc6f6cb7 Adding table() method to migrations model 2011-01-10 14:15:07 +00:00
Matt Button 7ff67837b6 Refactored the migration model slightly, reduces the complexity and removes stupid code that shouldn't have been there in the first place 2010-12-31 00:49:09 +00:00
Matt Button 41a7392f15 Changing timestamps to be {year}{month}{day}{hour}{minute}{second}
Also added get_migration method to model and some more tests
2010-12-30 15:06:52 +00:00
Matt Button 6a90ec0c90 Adding mark_migration() method to migration model, allowing the manager to mark a migration as completed 2010-12-30 03:51:20 +00:00
Matt Button 8406255305 Fixing a bug where the migration model gets mixed up if you pass in a numerically
indexed array of locations as opposed to an associative one
2010-12-30 03:42:03 +00:00
Matt Button 3021f5727b Removing superflous condition in migration model 2010-12-30 03:33:16 +00:00
Matt Button a3636f866f Fixing a bug where there are no versioned locations 2010-12-30 02:10:08 +00:00
Matt Button e1a60f9d74 Added migration sync functionality between FS and DB table 2010-12-29 04:29:05 +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 e64ce18a71 Changing model methods so they return an array instead of a database result 2010-12-29 00:46:07 +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 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