mirror of
https://github.com/discourse/discourse-ai.git
synced 2025-02-07 12:08:13 +00:00
1916bafca0
* FIX: Remove `null: false` from dropped column It's causing an issue when attempting to seed data in fresh installs. The column was dropped in a post-migration. * Update db/migrate/20230322142028_make_dropped_value_column_nullable.rb Co-authored-by: David Taylor <david@taylorhq.com> --------- Co-authored-by: David Taylor <david@taylorhq.com>
15 lines
374 B
Ruby
15 lines
374 B
Ruby
# frozen_string_literal: true
|
|
class MakeDroppedValueColumnNullable < ActiveRecord::Migration[7.0]
|
|
def up
|
|
if column_exists?(:completion_prompts, :value)
|
|
Migration::SafeMigrate.disable!
|
|
change_column_null :completion_prompts, :value, true
|
|
Migration::SafeMigrate.enable!
|
|
end
|
|
end
|
|
|
|
def down
|
|
raise ActiveRecord::IrreversibleMigration
|
|
end
|
|
end
|