Skip to content

Commit

Permalink
DEV: resolve Rails/ReversibleMigrationMethodDefinition errors (#636)
Browse files Browse the repository at this point in the history
  • Loading branch information
tyb-talks authored Oct 25, 2024
1 parent 557d00b commit 8bcf98b
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,8 @@ def up
DELETE FROM schema_migration_details WHERE version = '20201303000002';
SQL
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@ def up
unique: true,
where: "name = '#{DiscoursePostEvent::TOPIC_POST_EVENT_STARTS_AT}'"
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
4 changes: 4 additions & 0 deletions db/migrate/20200409181607_remove_display_invitees.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,8 @@ class RemoveDisplayInvitees < ActiveRecord::Migration[6.0]
def up
remove_column :discourse_post_event_events, :display_invitees
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,8 @@ def up
unique: true,
where: "name = '#{DiscoursePostEvent::TOPIC_POST_EVENT_ENDS_AT}'"
end

def down
raise ActiveRecord::IrreversibleMigration
end
end
4 changes: 4 additions & 0 deletions db/migrate/20220724130519_fix_post_event_timezones.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,8 @@ def up
AND topic_custom_fields.name IN ('TopicEventStartsAt', 'TopicEventEndsAt')
SQL
end

def down
raise ActiveRecord::IrreversibleMigration
end
end

0 comments on commit 8bcf98b

Please sign in to comment.