mirror of
https://github.com/discourse/discourse.git
synced 2025-02-06 11:28:18 +00:00
3d4faf3272
Automation (previously known as discourse-automation) is now a core plugin.
17 lines
492 B
Ruby
17 lines
492 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AddTimestampsToAutomations < ActiveRecord::Migration[6.1]
|
|
def change
|
|
add_column :discourse_automation_automations, :last_updated_by_id, :integer, null: true
|
|
|
|
DB.exec(<<~SQL, user_id: Discourse::SYSTEM_USER_ID)
|
|
UPDATE discourse_automation_automations
|
|
SET last_updated_by_id = :user_id
|
|
SQL
|
|
|
|
execute <<~SQL
|
|
ALTER TABLE discourse_automation_automations ALTER COLUMN last_updated_by_id SET NOT NULL;
|
|
SQL
|
|
end
|
|
end
|