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.6.11 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.10 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.9 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.8 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.7 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.6 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.5 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.4 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.3 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.2 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.1 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.6.0 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.3 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.2 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.1 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.0 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.0.rc5 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.0.rc4 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.0.rc3 db/migrate/20120611095315_create_settings.rb
sunrise-cms-0.5.0.rc2 db/migrate/20120611095315_create_settings.rb