--- /dev/null
+class AddPrimaryKeyToChangesetTags < ActiveRecord::Migration[7.0]
+ disable_ddl_transaction!
+
+ def up
+ add_primary_key :changeset_tags, [:changeset_id, :k], :algorithm => :concurrently
+ remove_index :changeset_tags, [:changeset_id]
+ end
+
+ def down
+ add_index :changeset_tags, [:changeset_id], :algorithm => :concurrently
+ remove_primary_key :changeset_tags
+ end
+end
ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
+--
+-- Name: changeset_tags changeset_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY public.changeset_tags
+ ADD CONSTRAINT changeset_tags_pkey PRIMARY KEY (changeset_id, k);
+
+
--
-- Name: changesets changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
--
CREATE INDEX acls_k_idx ON public.acls USING btree (k);
---
--- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE INDEX changeset_tags_id_idx ON public.changeset_tags USING btree (changeset_id);
-
-
--
-- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -
--
('20230825162137'),
('20230830115219'),
('20230830115220'),
+('20231007141103'),
('21'),
('22'),
('23'),