Sha256: 1aa02a112137cde4936e2797b78b622acb3cd6f6d7ef7ff5ee2e561b822bfb6b
Contents?: true
Size: 882 Bytes
Versions: 45
Compression:
Stored size: 882 Bytes
Contents
require_relative "migration_helper" include PactBroker::MigrationHelper Sequel.migration do up do if postgres? run("CREATE INDEX tags_pacticipant_id_name_version_order_desc_index ON tags (pacticipant_id, name, version_order DESC);") run("CREATE INDEX versions_pacticipant_id_order_desc_index ON versions (pacticipant_id, \"order\" DESC);") else alter_table(:tags) do add_index([:pacticipant_id, :name, :version_order], name: "tags_pacticipant_id_name_version_order_index") end end end down do if postgres? run("DROP INDEX tags_pacticipant_id_name_version_order_desc_index") run("DROP INDEX versions_pacticipant_id_order_desc_index") else alter_table(:tags) do drop_index([:pacticipant_id, :name, :version_order], name: "tags_pacticipant_id_name_version_order_index") end end end end
Version data entries
45 entries across 45 versions & 1 rubygems