Sha256: 6921a85782875191b1d66e2c23ea212846a9805c320b373aecccd81d659c7ad7
Contents?: true
Size: 874 Bytes
Versions: 13
Compression:
Stored size: 874 Bytes
Contents
require_relative "migration_helper" include PactBroker::MigrationHelper Sequel.migration do up do # MySQL automatically creates indexes for foreign keys then complains if you # re-create it with a different name and try to drop it. # https://stackoverflow.com/a/52274628/832671 - "When there is only one index that can be used # for the foreign key, it can't be dropped. If you really wan't to drop it, you either have to drop # the foreign key constraint or to create another index for it first." if !mysql? alter_table(:verifications) do add_index([:provider_version_id], name: "verifications_provider_version_id_index") end end end down do if !mysql? alter_table(:verifications) do drop_index([:provider_version_id], name: "verifications_provider_version_id_index") end end end end
Version data entries
13 entries across 13 versions & 1 rubygems