]> git.openstreetmap.org Git - rails.git/commitdiff
Convert id column for oauth_nonces to bigint
authorTom Hughes <tom@compton.nu>
Mon, 14 Dec 2020 14:48:59 +0000 (14:48 +0000)
committerTom Hughes <tom@compton.nu>
Mon, 14 Dec 2020 14:48:59 +0000 (14:48 +0000)
app/models/oauth_nonce.rb
db/migrate/20201214144017_expand_nonce_id.rb [new file with mode: 0644]
db/structure.sql

index 5f0920a96f1fd537456ff79ea0dd243a4883acda..86463f297226e11dce96bcc55af1ffd31e92342e 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Table name: oauth_nonces
 #
-#  id         :integer          not null, primary key
+#  id         :bigint           not null, primary key
 #  nonce      :string
 #  timestamp  :integer
 #  created_at :datetime
diff --git a/db/migrate/20201214144017_expand_nonce_id.rb b/db/migrate/20201214144017_expand_nonce_id.rb
new file mode 100644 (file)
index 0000000..9416ffe
--- /dev/null
@@ -0,0 +1,7 @@
+class ExpandNonceId < ActiveRecord::Migration[6.0]
+  def change
+    safety_assured do
+      change_column :oauth_nonces, :id, :bigint
+    end
+  end
+end
index 5c33e48381d3f3ba95ca6a92dcbab8336820068c..b5c4ec01d120d6e23d9708346ebe8c3fca39839e 100644 (file)
@@ -1075,7 +1075,7 @@ ALTER SEQUENCE public.notes_id_seq OWNED BY public.notes.id;
 --
 
 CREATE TABLE public.oauth_nonces (
-    id integer NOT NULL,
+    id bigint NOT NULL,
     nonce character varying,
     "timestamp" integer,
     created_at timestamp without time zone,
@@ -3147,6 +3147,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20191120140058'),
 ('20201006213836'),
 ('20201006220807'),
+('20201214144017'),
 ('21'),
 ('22'),
 ('23'),