Sha256: 1b016f5175934a3ef55b75fe1a54ff17a42a792d95fdbdf00936d41308f0c8a2

Contents?: true

Size: 472 Bytes

Versions: 3

Compression:

Stored size: 472 Bytes

Contents

class CreateContents < ActiveRecord::Migration
  def self.up
    create_table :contents do |t|
      t.string     :title
      t.text       :abstract
      t.string     :menu_title
      t.string     :sub_title
      t.text       :body      
      t.string     :type # Single Table Inheritance
      t.integer    :approved, :null => false, :default => 0

      t.references :user
      
      t.timestamps
    end
  end

  def self.down
    drop_table :contents
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
emergent-core-0.1.0 rails_generators/emergent_config/templates/db/migrate/create_contents.rb
emergent-core-0.1.02 rails_generators/emergent_config/templates/db/migrate/create_contents.rb
emergent-core-0.1.01 rails_generators/emergent_config/templates/db/migrate/create_contents.rb