From a20240c27b4fb73e6d1fe501a12d5d1850108f72 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Fri, 15 Nov 2024 20:21:42 -0500 Subject: [PATCH] db migrate enums --- .../20190511152737_remove_suspended_silenced_account_fields.rb | 2 +- .../20201017234926_fill_account_suspension_origin.rb | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb b/db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb index 7788431cd5..ff4012ffa1 100644 --- a/db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb +++ b/db/post_migrate/20190511152737_remove_suspended_silenced_account_fields.rb @@ -7,7 +7,7 @@ class RemoveSuspendedSilencedAccountFields < ActiveRecord::Migration[5.2] class DomainBlock < ApplicationRecord # Dummy class, to make migration possible across version changes - enum severity: [:silence, :suspend, :noop] + enum :severity, [:silence, :suspend, :noop] has_many :accounts, foreign_key: :domain, primary_key: :domain end diff --git a/db/post_migrate/20201017234926_fill_account_suspension_origin.rb b/db/post_migrate/20201017234926_fill_account_suspension_origin.rb index b00f9df533..0bf9dbff03 100644 --- a/db/post_migrate/20201017234926_fill_account_suspension_origin.rb +++ b/db/post_migrate/20201017234926_fill_account_suspension_origin.rb @@ -6,7 +6,7 @@ class FillAccountSuspensionOrigin < ActiveRecord::Migration[5.2] class MigrationAccount < ApplicationRecord self.table_name = :accounts scope :suspended, -> { where.not(suspended_at: nil) } - enum suspension_origin: { local: 0, remote: 1 }, _prefix: true + enum :suspension_origin, { local: 0, remote: 1 }, prefix: true end def up