Sha256: 999bfb5f8bd193b65acbf4997b54e8dfc5cd69c57c820357d2d94feea61f3035

Contents?: true

Size: 1.39 KB

Versions: 214

Compression:

Stored size: 1.39 KB

Contents

Description:
    The extension_migration generator creates a stub for a new migration for an 
    extension.

    The generator takes the extension name, a migration name as its arguments,
    and an optional list of attribute pairs as arguments. The migration name 
    may be given in CamelCase or under_score.

    You can name your migration in either of these formats to generate add/remove
    column lines from supplied attributes: AddColumnsToTable or RemoveColumnsFromTable

    A migration class is generated in vendor/extensions/extension_name/db/migrate 
    prefixed by a timestamp of the current date and time. 

Examples:
    `./script/generate extension_migration MyExt AddSslFlag`

    If the current date is May 14, 2008 and the current time 09:09:12, this creates the AddSslFlag migration
    vendor/extensions/my_ext/db/migrate/20080514090912_add_ssl_flag.rb

    `./script/generate migration MyExt AddTitleBodyToPost title:string body:text published:boolean`
    
    This will create the AddTitleBodyToPost in vendor/extensions/my_ext/db/migrate/20080514090912_add_title_body_to_post.rb
    with this in the Up migration:

      add_column :posts, :title, :string  
      add_column :posts, :body, :text  
      add_column :posts, :published, :boolean

    And this in the Down migration:
    
      remove_column :posts, :published  
      remove_column :posts, :body  
      remove_column :posts, :title

Version data entries

214 entries across 214 versions & 5 rubygems

Version Path
trusty-cms-6.3.1 lib/generators/extension_migration/USAGE
trusty-cms-7.0.2 lib/generators/extension_migration/USAGE
trusty-cms-7.0.1 lib/generators/extension_migration/USAGE
trusty-cms-7.0.0 lib/generators/extension_migration/USAGE
trusty-cms-6.3 lib/generators/extension_migration/USAGE
trusty-cms-6.2.1 lib/generators/extension_migration/USAGE
trusty-cms-6.2.2.1 lib/generators/extension_migration/USAGE
trusty-cms-6.2.0 lib/generators/extension_migration/USAGE
trusty-cms-6.1.2 lib/generators/extension_migration/USAGE
trusty-cms-6.1.1 lib/generators/extension_migration/USAGE
trusty-cms-6.0.5 lib/generators/extension_migration/USAGE
trusty-cms-6.0.4 lib/generators/extension_migration/USAGE
trusty-cms-6.0.3 lib/generators/extension_migration/USAGE
trusty-cms-6.0.2 lib/generators/extension_migration/USAGE
trusty-cms-6.0.1 lib/generators/extension_migration/USAGE
trusty-cms-5.6.1 lib/generators/extension_migration/USAGE
trusty-cms-6.0.0 lib/generators/extension_migration/USAGE
trusty-cms-5.6.0 lib/generators/extension_migration/USAGE
trusty-cms-5.5.9 lib/generators/extension_migration/USAGE
trusty-cms-5.5.8 lib/generators/extension_migration/USAGE