Sha256: a021b7686aae92daeca1c0c44b01c46bb6d055dd12aeb4cf0ad34e3bbb457f8b
Contents?: true
Size: 882 Bytes
Versions: 5
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
5 entries across 5 versions & 1 rubygems