Sha256: 860e4aaa50db7ee961587af0a26ceb04181bd4f03b77e9207f55a297bfae5cc8

Contents?: true

Size: 363 Bytes

Versions: 18

Compression:

Stored size: 363 Bytes

Contents

class SunriseCreatePages < ActiveRecord::Migration
  def self.up
    create_table :pages do |t|
      t.string    :title, :null => false
      t.text      :content
      t.integer   :structure_id, :null => false
      
      t.timestamps
    end
    
    add_index :pages, :structure_id, :name => "fk_pages"
  end

  def self.down
    drop_table :pages
  end
end

Version data entries

18 entries across 13 versions & 4 rubygems

Version Path
sunrise-core-0.2.2 spec/dummy/db/migrate/20110616102856_sunrise_create_pages.rb
sunrise-core-0.2.2 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.2.1 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.2.1 spec/tmp/db/migrate/20110819144850_sunrise_create_pages.rb
sunrise-core-0.2.1 spec/dummy/db/migrate/20110616102856_sunrise_create_pages.rb
sunrise-widgets-0.1.1 spec/dummy/db/migrate/20110801125109_sunrise_create_pages.rb
sunrise-locales-0.1.0 spec/dummy/db/migrate/20110801125109_sunrise_create_pages.rb
sunrise-core-0.2.0 spec/dummy/db/migrate/20110616102856_sunrise_create_pages.rb
sunrise-core-0.2.0 spec/tmp/db/migrate/20110819144850_sunrise_create_pages.rb
sunrise-core-0.2.0 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-widgets-0.1.0 spec/dummy/db/migrate/20110801125109_sunrise_create_pages.rb
sunrise-questions-0.1.0 spec/dummy/db/migrate/20110801125109_sunrise_create_pages.rb
sunrise-core-0.1.5 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.1.4 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.1.3 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.1.2 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.1.1 lib/generators/sunrise/templates/migrate/create_pages.rb
sunrise-core-0.1.0 lib/generators/sunrise/templates/migrate/create_pages.rb