Sha256: e517cb47f93b2b3e1ede6d95fefd97df0448f19834b78b27fb2e1141d27fb4ea

Contents?: true

Size: 425 Bytes

Versions: 7

Compression:

Stored size: 425 Bytes

Contents

Sequel.migration do
  up do
    alter_table(:dependencies) do
      add_column :license_name, String
    end

    LicenseFinder::DB << <<-SQL
      UPDATE dependencies
      SET license_name =
      (SELECT name
      FROM
        license_aliases
      WHERE
        license_id = license_aliases.id)
    SQL

    alter_table(:dependencies) do
      drop_column :license_id
    end

    drop_table(:license_aliases)
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
license_finder-1.2 db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.2-java db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.1.1-java db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.1.1 db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.1.0 db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.0.1 db/migrate/201403191645_remove_license_aliases.rb
license_finder-1.0.0.1 db/migrate/201403191645_remove_license_aliases.rb