From: Milan Cvetkovic Date: Wed, 16 Aug 2023 12:04:32 +0000 (+0000) Subject: Add migration script X-Git-Tag: live~1122^2~1 X-Git-Url: https://git.openstreetmap.org./rails.git/commitdiff_plain/ef6803416be6a3be43162f18ed5128cebc4c6033 Add migration script --- 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'),