cirandas.net

ref: master

db/migrate/002_create_environments.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
class CreateEnvironments < ActiveRecord::Migration
  def self.up
    create_table :environments do |t|
      t.column :name,       :string
      t.column :contact_email, :string

      t.column :is_default, :boolean

      t.column :settings,   :text
      t.column :design_data, :text
    end
    Environment.create!(:name => 'Default Environment', :is_default => true)
  end

  def self.down
    drop_table :environments
  end
end