Sha256: 3046d537e1750850a3abc1183d1ae84ca828c17d1dffc8e268ccbce48d53c080

Contents?: true

Size: 459 Bytes

Versions: 13

Compression:

Stored size: 459 Bytes

Contents

Sequel.migration do
  up do
    LicenseFinder::DB << <<-SQL
      UPDATE dependencies
      SET license_id =
      (SELECT la.id
      FROM
        license_aliases la,
        license_aliases la_orig
      WHERE
        la.name = la_orig.name AND
        la_orig.id = license_id
      LIMIT 1)
    SQL

    LicenseFinder::DB << <<-SQL
      DELETE
      FROM license_aliases
      WHERE
      id NOT IN (SELECT license_id FROM dependencies)
    SQL
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
license_finder-1.2 db/migrate/201307251107_reassociate_license.rb
license_finder-1.2-java db/migrate/201307251107_reassociate_license.rb
license_finder-1.1.1-java db/migrate/201307251107_reassociate_license.rb
license_finder-1.1.1 db/migrate/201307251107_reassociate_license.rb
license_finder-1.1.0 db/migrate/201307251107_reassociate_license.rb
license_finder-1.0.1 db/migrate/201307251107_reassociate_license.rb
license_finder-1.0.0.1 db/migrate/201307251107_reassociate_license.rb
license_finder-1.0.0.0 db/migrate/201307251107_reassociate_license.rb
license_finder-1.0.0.0-java db/migrate/201307251107_reassociate_license.rb
license_finder-0.9.5.1-java db/migrate/201307251107_reassociate_license.rb
license_finder-0.9.5.1 db/migrate/201307251107_reassociate_license.rb
license_finder-0.9.5 db/migrate/201307251107_reassociate_license.rb
license_finder-0.9.5-java db/migrate/201307251107_reassociate_license.rb