From ef6803416be6a3be43162f18ed5128cebc4c6033 Mon Sep 17 00:00:00 2001 From: Milan Cvetkovic Date: Wed, 16 Aug 2023 12:04:32 +0000 Subject: [PATCH] Add migration script --- db/migrate/20230816135800_use_microsoft_graph.rb | 9 +++++++++ db/structure.sql | 1 + 2 files changed, 10 insertions(+) create mode 100644 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 index 000000000..e83d3db44 --- /dev/null +++ b/db/migrate/20230816135800_use_microsoft_graph.rb @@ -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 diff --git a/db/structure.sql b/db/structure.sql index 89874d779..86537003f 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -3395,6 +3395,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20211216185316'), ('20220201183346'), ('20220223140543'), +('20230816135800'), ('21'), ('22'), ('23'), -- 2.39.5