Sha256: b34f75575f56d6fb178bbb1d86e386c1b0f2efaa601ff4c6f8cb7c2dc029d4dd

Contents?: true

Size: 828 Bytes

Versions: 2

Compression:

Stored size: 828 Bytes

Contents

class CreateComfyCarousel < ActiveRecord::Migration
  
  def self.up
    create_table :carousel_carousels do |t|
      t.string :label,      :null => false
      t.string :identifier, :null => false
      t.string :dimensions
      t.timestamps
    end
    add_index :carousel_carousels, :identifier
    
    create_table :carousel_slides do |t|
      t.integer :carousel_id, :null => false
      t.string  :label,       :null => false
      t.text    :content
      t.string  :url
      t.string  :file_file_name
      t.string  :file_content_type
      t.integer :file_file_size
      t.integer :position,    :null => false, :default => 0
      t.timestamps
    end
    add_index :carousel_slides, [:carousel_id, :position]
  end
  
  def self.down
    drop_table :carousel_carousels
    drop_table :carousel_slides
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
comfy_carousel-0.0.3 db/migrate/01_create_comfy_carousel.rb
comfy_carousel-0.0.2 db/migrate/01_create_comfy_carousel.rb