Sha256: 174fe0c3dba942d7956203f0e514b1b249f333aaced21247eabc39731785bdd1

Contents?: true

Size: 503 Bytes

Versions: 5

Compression:

Stored size: 503 Bytes

Contents

class FreeberryCreateHeaders < ActiveRecord::Migration
  def self.up
    create_table :headers do |t|
      t.string    :title
      t.string    :keywords
      t.text      :description
      
      t.string    :headerable_type, :limit => 30, :null => false
      t.integer   :headerable_id, :null => false
      
      t.timestamps
    end
    
    add_index :headers, [:headerable_type, :headerable_id], :uniq => true, :name => "fk_headerable"
  end

  def self.down
    drop_table :headers
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
freeberry-0.3.0 lib/generators/freeberry/models/templates/create_headers.rb
freeberry-0.2.9 lib/generators/freeberry/models/templates/create_headers.rb
freeberry-0.2.7 lib/generators/freeberry/models/templates/create_headers.rb
freeberry-0.2.6 lib/generators/freeberry/models/templates/create_headers.rb
freeberry-0.2.5 lib/generators/freeberry/models/templates/create_headers.rb