12 lines
519 B
Ruby
12 lines
519 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddAgentToConversation < ActiveRecord::Migration[8.0]
|
|
def change
|
|
# NOTE: Violating Rails/NotNullColumn is fine if there's no production environment yet.
|
|
# Otherwise I usually make a migration that uses null: true,
|
|
# then backfills something reasonable, then sets null: false.
|
|
# Of course only in the case if I don't want the column to just have a default.
|
|
add_column :conversations, :agent, :string, null: false # rubocop:disable Rails/NotNullColumn
|
|
end
|
|
end
|