Sha256: 1d0ef1a6fcbe5f8cc37b3b2cca4247ed89a022821eb51c36eb3aeea4eb09121e

Contents?: true

Size: 427 Bytes

Versions: 12

Compression:

Stored size: 427 Bytes

Contents

class AddFeatures < ActiveRecord::Migration

    def up
        create_table :features do |t|
            t.string   :name, :null => false
            t.integer  :parent_id
            t.boolean  :active,         :default => nil
        end
        add_index :features, [ :parent_id, :name ], :unique => true
    end

    def down
        remove_index :features, [ :parent_id, :name ]
        drop_table :features
    end

end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
build-tool-0.6.9 db/migrations/20110815170000_add_features.rb
build-tool-0.6.8 db/migrations/20110815170000_add_features.rb
build-tool-0.6.7 db/migrations/20110815170000_add_features.rb
build-tool-0.6.6 db/migrations/20110815170000_add_features.rb
build-tool-0.6.5 db/migrations/20110815170000_add_features.rb
build-tool-0.6.4 db/migrations/20110815170000_add_features.rb
build-tool-0.6.3 db/migrations/20110815170000_add_features.rb
build-tool-0.6.2 db/migrations/20110815170000_add_features.rb
build-tool-0.6.1 db/migrations/20110815170000_add_features.rb
build-tool-0.6.0 db/migrations/20110815170000_add_features.rb
build-tool-0.6.0.rc2 db/migrations/20110815170000_add_features.rb
build-tool-0.6.0.rc1 db/migrations/20110815170000_add_features.rb