Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.
Ruby agplai-assistantdockerdsgvogdprhotwireissue-trackerjira-alternativeknowledge-basellmmcp-servermeeting-notesopen-sourceproject-managementredmine-alternativeruby-on-railsself-hostedticketingtime-tracking
# frozen_string_literal: true
class FixActivitiesChangesColumn < ActiveRecord::Migration[8.0]
def up
# Check if 'changes' column exists and rename it
if column_exists?(:activities, :changes)
rename_column :activities, :changes, :attribute_changes
end
# Ensure attribute_changes column exists with correct type
unless column_exists?(:activities, :attribute_changes)
add_column :activities, :attribute_changes, :jsonb, default: {}
end
end
def down
# Only rename back if we originally had a 'changes' column
if column_exists?(:activities, :attribute_changes) && !column_exists?(:activities, :changes)
rename_column :activities, :attribute_changes, :changes
end
end
end