Sha256: c73e600755fe8a21085c580cd9f8747fde79eca08b5a7e351c1484e6c9ca8a0c

Contents?: true

Size: 407 Bytes

Versions: 29

Compression:

Stored size: 407 Bytes

Contents

class CreateSettings < ActiveRecord::Migration
  def self.up
    create_table(:settings) do |t|
      t.string  :var, :limit => 50, :null => false
      t.text    :value
      t.integer :target_id
      t.string  :target_type, :limit => 30
      t.timestamps
    end
    
    add_index :settings, [:var, :target_type, :target_id], :unique => true
  end
  
  def self.down
    drop_table :settings
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
sunrise-cms-0.5.0.rc1 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.4.2 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.4.1 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.4.0 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.3.3 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.3.2 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.3.1 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.3.0 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.3.0.rc2 db/migrate/20120611095315_create_settings.rb