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-4.2.3 lib/generators/extension_migration/USAGE
trusty-cms-4.2.2 lib/generators/extension_migration/USAGE
trusty-cms-4.2.1 lib/generators/extension_migration/USAGE
trusty-cms-4.2 lib/generators/extension_migration/USAGE
trusty-cms-4.1.9 lib/generators/extension_migration/USAGE
trusty-cms-3.8.2 lib/generators/extension_migration/USAGE
trusty-cms-3.8.1 lib/generators/extension_migration/USAGE
trusty-cms-3.8.0 lib/generators/extension_migration/USAGE
trusty-cms-3.7.1 lib/generators/extension_migration/USAGE
trusty-cms-3.7.0 lib/generators/extension_migration/USAGE
trusty-cms-3.6.2 lib/generators/extension_migration/USAGE
trusty-cms-3.6.1 lib/generators/extension_migration/USAGE
trusty-cms-3.6.0 lib/generators/extension_migration/USAGE
trusty-cms-3.5.5 lib/generators/extension_migration/USAGE
trusty-cms-3.5.4 lib/generators/extension_migration/USAGE
trusty-cms-3.5.3 lib/generators/extension_migration/USAGE
trusty-cms-3.5.2 lib/generators/extension_migration/USAGE
trusty-cms-3.5.1 lib/generators/extension_migration/USAGE
trusty-cms-3.5.0 lib/generators/extension_migration/USAGE
trusty-cms-3.4.0 lib/generators/extension_migration/USAGE