Sha256: 88f0de822c7a0d0500a37261285c5586e9370eb7698134a76d3df6c8ae582f04

Contents?: true

Size: 262 Bytes

Versions: 106

Compression:

Stored size: 262 Bytes

Contents

class AssetUuid < ActiveRecord::Migration[5.2]
  def self.up
    add_column :assets, :uuid, :string
    Asset.reset_column_information
    Asset.all.each { |a| a.save! }    # triggers assign_uuid
  end

  def self.down
    remove_column :assets, :uuid
  end
end

Version data entries

106 entries across 106 versions & 1 rubygems

Version Path
trusty-cms-6.3.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-7.0.2 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-7.0.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-7.0.0 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.3 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.2.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.2.2.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.2.0 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.1.2 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.1.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.5 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.4 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.3 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.2 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-5.6.1 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-6.0.0 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-5.6.0 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-5.5.9 db/migrate/20110513205050_asset_uuid.rb
trusty-cms-5.5.8 db/migrate/20110513205050_asset_uuid.rb