Last active
December 15, 2015 21:29
-
-
Save mingliangfeng/5325929 to your computer and use it in GitHub Desktop.
RefineryCMS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # how to add a migration to an extension | |
| 1. Under app folder: | |
| > rails g migration add_a_field_to_a_table ... | |
| 2. Copy this migration from app db/migrate folder to extension db/migrate folder and rename the file: | |
| > mv db/migrate/1222_add...rb <extension's db/migrate> | |
| > # then rename the migration file to #_add... | |
| 3. still on app folder, run the following command to copy the migrate from extension to app: | |
| > rake refinery_<extension name>:install:migrations | |
| 4. still on app folder, run: | |
| > [RAILS_ENV=development] rake db:migrate | |
| > rake db:migrate development | |
| 5. insert scaffold to existing extension: | |
| > rails generate refinery:engine user provider:string uid:string name:string --extension clients --namespace clients --skip-frontend -s -p |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment