Sha256: 932259c22edf598dffb2b2d09fd812dd8379bc75344c1f9b2e68c5056e757a91

Contents?: true

Size: 464 Bytes

Versions: 9

Compression:

Stored size: 464 Bytes

Contents

Sequel.migration do
  up do
    LicenseFinder::DB << <<-SQL
      UPDATE dependencies
      SET license_id =
      (SELECT min(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

9 entries across 9 versions & 1 rubygems

Version Path
license_finder-1.2 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.2-java db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.1.1-java db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.1.1 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.1.0 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.0.1 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.0.0.1 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.0.0.0 db/migrate/201401302113_re_reassociate_license.rb
license_finder-1.0.0.0-java db/migrate/201401302113_re_reassociate_license.rb