]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20230816135800_use_microsoft_graph.rb
Add migration script
[rails.git] / db / migrate / 20230816135800_use_microsoft_graph.rb
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