Sha256: 75c3ace40038900bcf693c4ac156d5c48e4deae4792b6fd61421aa1816ca17f7

Contents?: true

Size: 317 Bytes

Versions: 8

Compression:

Stored size: 317 Bytes

Contents

class <%= class_name %> < ActiveRecord::Migration
  @tablename = :settings
  
  def self.up
    create_table @tablename do |t|
      t.string :key, :null => false
      t.text :value   
    end
    add_index @tablename, :key
  end

  def self.down
    remove_index @tablename, :key
    drop_table @tablename
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
settings-goo-0.3.5 generators/settings_migration/templates/migration.rb
settings-goo-0.3.4 generators/settings_migration/templates/migration.rb
settings-goo-0.3.3 generators/settings_migration/templates/migration.rb
settings-goo-0.3.2 generators/settings_migration/templates/migration.rb
settings-goo-0.3.1 generators/settings_migration/templates/migration.rb
settings-goo-0.3.0 generators/settings_migration/templates/migration.rb
settings-goo-0.2.0 generators/settings_migration/templates/migration.rb
settings-goo-0.1.0 generators/settings_migration/templates/migration.rb