]> git.openstreetmap.org Git - rails.git/commitdiff
Add migration script
authorMilan Cvetkovic <mcvetkovic@microsoft.com>
Wed, 16 Aug 2023 12:04:32 +0000 (12:04 +0000)
committerTom Hughes <tom@compton.nu>
Sun, 20 Aug 2023 09:17:42 +0000 (10:17 +0100)
db/migrate/20230816135800_use_microsoft_graph.rb [new file with mode: 0644]
db/structure.sql

diff --git a/db/migrate/20230816135800_use_microsoft_graph.rb b/db/migrate/20230816135800_use_microsoft_graph.rb
new file mode 100644 (file)
index 0000000..e83d3db
--- /dev/null
@@ -0,0 +1,9 @@
+class UseMicrosoftGraph < ActiveRecord::Migration[7.0]
+  def self.up
+    User.where(:auth_provider => 'windowslive').update_all(:auth_provider => 'microsoft_graph')
+  end
+
+  def self.down
+    User.where(:auth_provider => 'microsoft_graph').update_all(:auth_provider => 'windowslive')
+  end
+end
index 89874d7791524e110dc937b6652c278b60b96e2c..86537003fc4627ef768adb6b84e8bf88f4936438 100644 (file)
@@ -3395,6 +3395,7 @@ INSERT INTO "schema_migrations" (version) VALUES
 ('20211216185316'),
 ('20220201183346'),
 ('20220223140543'),
+('20230816135800'),
 ('21'),
 ('22'),
 ('23'),