Sha256: 53dac027fe4d5deea05cc77b52b1360ba3a1c5bb4a539048f3137849f4c5578b

Contents?: true

Size: 257 Bytes

Versions: 56

Compression:

Stored size: 257 Bytes

Contents

class AssetUuid < ActiveRecord::Migration
  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

56 entries across 56 versions & 4 rubygems

Version Path
trusty-clipped-extension-3.0.0 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.15 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.14 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.13 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.12 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.11 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.10 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.9 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.8 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.7 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.6 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.5 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.4 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.3.pre.beta db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.2.pre.beta db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.1.pre.beta db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-2.0.0.pre.beta db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-1.1.1 db/migrate/20110513205050_asset_uuid.rb
trusty-clipped-extension-1.1.0 db/migrate/20110513205050_asset_uuid.rb
radiant-clipped-extension-1.1.2 db/migrate/20110513205050_asset_uuid.rb