Sha256: 39f416e3b3434a14eb355e342d0bf41520aad2a215984535496e61cb928545af

Contents?: true

Size: 585 Bytes

Versions: 8

Compression:

Stored size: 585 Bytes

Contents

class Create<%= @class_name.pluralize %> < ActiveRecord::Migration

  def up
    create_table :<%= @table_name %> do |t|
      t.text :slider_type, null: false
      t.text :image
      t.text :title
      t.text :file_name
      t.text :content_type
      t.integer :size
      t.integer :width
      t.integer :height
      t.integer :position, :integer
      t.integer :container_slider_id
      t.timestamps
    end
    add_index :<%= @table_name %>, :position
    add_index :<%= @table_name %>, :container_slider_id
  end

  def down
    drop_table :<%= @table_name %>
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
coalla-cms-0.4.2.0 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.7.0.0 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.5.2.4 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.6.1.1 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.6.0.9 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.4.4.3 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.5.1.9 lib/generators/coalla/cms/slider/templates/migration.rb.erb
coalla-cms-0.5.1.8 lib/generators/coalla/cms/slider/templates/migration.rb.erb