Sha256: 02db90a9612a37e64b8f148cae0a4db6be63995ac821b3da2d8a4f35cf3c97bd

Contents?: true

Size: 357 Bytes

Versions: 26

Compression:

Stored size: 357 Bytes

Contents

class RenameColumnAccessHashToToken < ActiveRecord::Migration[5.2]
  def change
    if table_exists?(:spree_wishlists)
      rename_column(:spree_wishlists, :access_hash, :token) if column_exists?(:spree_wishlists, :access_hash)
      add_reference(:spree_wishlists, :store, index: true) unless column_exists?(:spree_wishlists, :store_id)
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
spree_core-4.10.1 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.10.0 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.9.0 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.8.3 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.8.2 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.7.3 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.6 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.5.5 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.4.1 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.5.4 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.5 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.7.2 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.7.1 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.4 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.7.0 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.3 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.2 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.1 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.6.0 db/migrate/20210921070812_rename_column_access_hash_to_token.rb
spree_core-4.5.3 db/migrate/20210921070812_rename_column_access_hash_to_token.rb