Sha256: 860a2f2099d232fb7007696724bc7110076cfc0d6820916272cdb2e27488fe53

Contents?: true

Size: 453 Bytes

Versions: 121

Compression:

Stored size: 453 Bytes

Contents

class RenameCreatedByUpdatedByColumns < ActiveRecord::Migration
  def self.up
    %w{pages snippets layouts users}.each do |table|
      rename_column table, :created_by, :created_by_id
      rename_column table, :updated_by, :updated_by_id
    end
  end

  def self.down
    %w{pages snippets layouts users}.each do |table|
      rename_column table, :created_by_id, :created_by
      rename_column table, :updated_by_id, :updated_by
    end
  end
end

Version data entries

121 entries across 121 versions & 6 rubygems

Version Path
trusty-cms-2.0.0.pre.beta db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.2.29 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.2.28 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.28 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.27 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.26 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.25 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.24 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.23 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.22 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.21 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.20 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.19 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.18 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.17 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.16 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.15 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.14 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.13 db/migrate/017_rename_created_by_updated_by_columns.rb
trusty-cms-1.1.12 db/migrate/017_rename_created_by_updated_by_columns.rb