Sha256: d00e4a6a3ad69a9394cc4036e4754a0753cf25c97a8d7b1f000b71192c12ec54

Contents?: true

Size: 396 Bytes

Versions: 20

Compression:

Stored size: 396 Bytes

Contents

class RenameRedirectTo < ActiveRecord::Migration
  def self.up
    # The original version of the redirects table used 'to' as a column name
    # Postgres is okay with that, but not mysql.
    rename_column :redirects, :to, :to_path rescue nil
  end

  def self.down
    # don't rename column back to broken name.
    # there's little chance this column will be used before now anyway.
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
typo-3.99.0 db/migrate/028_rename_redirect_to.rb
typo-3.99.1 db/migrate/028_rename_redirect_to.rb
typo-3.99.3 db/migrate/028_rename_redirect_to.rb
typo-3.99.2 db/migrate/028_rename_redirect_to.rb
typo-4.0.1 db/migrate/028_rename_redirect_to.rb
typo-4.0.2 db/migrate/028_rename_redirect_to.rb
typo-3.99.4 db/migrate/028_rename_redirect_to.rb
typo-4.0.0 db/migrate/028_rename_redirect_to.rb
typo-4.0.3 db/migrate/028_rename_redirect_to.rb
typo-4.1.1 db/migrate/028_rename_redirect_to.rb
typo-5.0.1 db/migrate/028_rename_redirect_to.rb
typo-5.0.2 db/migrate/028_rename_redirect_to.rb
typo-4.1 db/migrate/028_rename_redirect_to.rb
typo-5.0.3.98.1 db/migrate/028_rename_redirect_to.rb
typo-5.0 db/migrate/028_rename_redirect_to.rb
typo-5.0.3.98 db/migrate/028_rename_redirect_to.rb
typo-5.1.1 db/migrate/028_rename_redirect_to.rb
typo-5.1.2 db/migrate/028_rename_redirect_to.rb
typo-5.1.3 db/migrate/028_rename_redirect_to.rb
typo-5.1 db/migrate/028_rename_redirect_to.rb