Refinery - "Ready-to-eat" migrations for CodeIgniter |
06-06-2015, 11:01 PM
(This post was last modified: 03-12-2016, 08:09 PM by rougin. Edit Reason: Update documentation )
Hello! I'm using Migrations Class for quite some time now but I'm having a hard time to create migrations and creating a controller that will migrate them all (especially the timestamps ). So that's why I've created this library, Refinery, with a goal to supplement the features of the Migrations Class and help you save time in creating migrations for your web applications built in CodeIgniter. https://github.com/rougin/refinery
To install this library, you will need to use Composer for that because it's easy to install it there: Code: $ composer require rougin/refinery Here are some examples on how to use it. Creating a table named user: Code: $ php vendor/bin/refinery create create_user_table 20150607123241_create_user_table.php PHP Code: class Migration_create_user_table extends CI_Migration { Adding column named name in user table: Code: $ php vendor/bin/refinery create add_name_in_user_table 20150607123510_add_name_in_user_table.php PHP Code: class Migration_add_name_in_user_table extends CI_Migration { Migrating all files from application/migrations directory: Code: $ php vendor/bin/refinery migrate You can also revert back if you want: Code: $ php vendor/bin/refinery migrate --revert=1 Or reset them back: Code: $ php vendor/bin/refinery migrate:reset
Hi! I've made some fixes for the latest release. Thanks for the ones who helped.
|
Welcome Guest, Not a member yet? Register Sign In |