Sha256: 10df3e371e76e38ee57f8fd79926192c722e515720f284f8b56c9c3cd810b3cb

Contents?: true

Size: 452 Bytes

Versions: 20

Compression:

Stored size: 452 Bytes

Contents

class RenameAppConfiguration < ActiveRecord::Migration
  def self.up
    rename_table :app_configurations, :configurations
    change_table :configurations do |t|
      t.string :type
    end
    execute "UPDATE configurations SET type = 'AppConfiguration' WHERE name = 'Default configuration'"
  end

  def self.down
    change_table :configurations do |t|
      t.remove :type
    end
    rename_table :configurations, :app_configurations 
  end
end

Version data entries

20 entries across 20 versions & 3 rubygems

Version Path
kdmny-spree-0.0.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-enriquez-0.9.4 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.9.4 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.9.3 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.9.2 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.9.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.9.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.4 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.5 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.4.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.4.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.5.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.5.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.6.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.7.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.7.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.0 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.1 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.2 db/migrate/20080918140438_rename_app_configuration.rb
spree-0.8.3 db/migrate/20080918140438_rename_app_configuration.rb