diff --git a/app/models/card/eventable/system_commenter.rb b/app/models/card/eventable/system_commenter.rb index 6e5d0ca2f..6d9155f15 100644 --- a/app/models/card/eventable/system_commenter.rb +++ b/app/models/card/eventable/system_commenter.rb @@ -10,7 +10,7 @@ class Card::Eventable::SystemCommenter if comment = find_replaceable_system_comment comment.update! body: comment_body else - card.comments.create! creator: User.system, body: comment_body + card.comments.create! creator: User.system, body: comment_body, created_at: event.created_at end end diff --git a/db/migrate/20250429162506_flatten_messages_and_comments.rb b/db/migrate/20250429162506_flatten_messages_and_comments.rb index 5c998fb02..f2a777ae8 100644 --- a/db/migrate/20250429162506_flatten_messages_and_comments.rb +++ b/db/migrate/20250429162506_flatten_messages_and_comments.rb @@ -15,5 +15,6 @@ class FlattenMessagesAndComments < ActiveRecord::Migration[8.1] change_column_null :comments, :card_id, false drop_table :messages + drop_table :event_summaries end end diff --git a/db/schema.rb b/db/schema.rb index fd0b0d793..e12769463 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -174,11 +174,6 @@ ActiveRecord::Schema[8.1].define(version: 2025_04_29_162506) do t.index ["filter_id"], name: "index_creators_filters_on_filter_id" end - create_table "event_summaries", force: :cascade do |t| - t.datetime "created_at", null: false - t.datetime "updated_at", null: false - end - create_table "events", force: :cascade do |t| t.string "action", null: false t.integer "collection_id", null: false @@ -286,7 +281,6 @@ ActiveRecord::Schema[8.1].define(version: 2025_04_29_162506) do t.datetime "created_at", null: false t.string "title" t.datetime "updated_at", null: false - t.index ["title"], name: "index_tags_on_account_id_and_title", unique: true end create_table "users", force: :cascade do |t| diff --git a/db/schema_cache.yml b/db/schema_cache.yml index 970285953..ce6fc968a 100644 --- a/db/schema_cache.yml +++ b/db/schema_cache.yml @@ -541,10 +541,6 @@ columns: creators_filters: - *23 - *18 - event_summaries: - - *5 - - *6 - - *9 events: - !ruby/object:ActiveRecord::ConnectionAdapters::SQLite3::Column auto_increment: @@ -937,7 +933,6 @@ primary_keys: collections_filters: comments: id creators_filters: - event_summaries: id events: id filters: id filters_stages: @@ -974,7 +969,6 @@ data_sources: collections_filters: true comments: true creators_filters: true - event_summaries: true events: true filters: true filters_stages: true @@ -1516,7 +1510,6 @@ indexes: nulls_not_distinct: comment: valid: true - event_summaries: [] events: - !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition table: events @@ -1923,23 +1916,7 @@ indexes: nulls_not_distinct: comment: valid: true - tags: - - !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition - table: tags - name: index_tags_on_account_id_and_title - unique: true - columns: - - title - lengths: {} - orders: {} - opclasses: {} - where: - type: - using: - include: - nulls_not_distinct: - comment: - valid: true + tags: [] users: - !ruby/object:ActiveRecord::ConnectionAdapters::IndexDefinition table: users