diff --git a/db/migrate/20210115203009_fix_typo_in_activity_attachment_type.rb b/db/migrate/20210115203009_fix_typo_in_activity_attachment_type.rb new file mode 100644 index 00000000..259c1972 --- /dev/null +++ b/db/migrate/20210115203009_fix_typo_in_activity_attachment_type.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH WTO-AP-3.0-or-later +# Full license explanation at https://github.com/houdiniproject/houdini/blob/master/License + +# The attachment_type for SupporterNote activities is wrong. This code fixes that +class FixTypoInActivityAttachmentType < ActiveRecord::Migration[6.1] + def up + Activity.connection.execute("UPDATE activities SET attachment_type = 'SupporterNote' WHERE (kind = 'SupporterNote' AND attachment_type != 'SupporterNote')") + end +end diff --git a/db/structure.sql b/db/structure.sql index 57740003..f294819d 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -4157,6 +4157,7 @@ INSERT INTO "schema_migrations" (version) VALUES ('20210105192022'), ('20210107210143'), ('20210111220133'), -('20210114213034'); +('20210114213034'), +('20210115203009');