]> git.openstreetmap.org Git - rails.git/commitdiff
Merge remote-tracking branch 'upstream/pull/4391'
authorTom Hughes <tom@compton.nu>
Wed, 6 Dec 2023 17:54:47 +0000 (17:54 +0000)
committerTom Hughes <tom@compton.nu>
Wed, 6 Dec 2023 17:54:47 +0000 (17:54 +0000)
db/migrate/20231206141457_alter_sequences_bigint.rb [new file with mode: 0644]
db/structure.sql

diff --git a/db/migrate/20231206141457_alter_sequences_bigint.rb b/db/migrate/20231206141457_alter_sequences_bigint.rb
new file mode 100644 (file)
index 0000000..9920fc8
--- /dev/null
@@ -0,0 +1,17 @@
+class AlterSequencesBigint < ActiveRecord::Migration[7.1]
+  def up
+    safety_assured do
+      execute "ALTER SEQUENCE oauth_nonces_id_seq AS bigint"
+      execute "ALTER SEQUENCE notes_id_seq AS bigint"
+      execute "ALTER SEQUENCE note_comments_id_seq AS bigint"
+    end
+  end
+
+  def down
+    safety_assured do
+      execute "ALTER SEQUENCE oauth_nonces_id_seq AS integer"
+      execute "ALTER SEQUENCE notes_id_seq AS integer"
+      execute "ALTER SEQUENCE note_comments_id_seq AS integer"
+    end
+  end
+end
index c30378c37e3bf86fc205cb09ed46a5209218ecf3..ba60918f0ee1a93c8333aef7544fe52ed647cf0f 100644 (file)
@@ -1024,7 +1024,6 @@ CREATE TABLE public.note_comments (
 --
 
 CREATE SEQUENCE public.note_comments_id_seq
-    AS integer
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1060,7 +1059,6 @@ CREATE TABLE public.notes (
 --
 
 CREATE SEQUENCE public.notes_id_seq
-    AS integer
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -1206,7 +1204,6 @@ CREATE TABLE public.oauth_nonces (
 --
 
 CREATE SEQUENCE public.oauth_nonces_id_seq
-    AS integer
     START WITH 1
     INCREMENT BY 1
     NO MINVALUE
@@ -3513,6 +3510,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('23'),
 ('22'),
 ('21'),
+('20231206141457'),
 ('20231117170422'),
 ('20231101222146'),
 ('20231029151516'),