mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-09 00:00:12 +09:00
9fd1563c9b
Require all three SQLite triggers before treating the counter as installed, drop the schema.rb / dump-rewrite install paths in favor of rake ensure after schema load, isolate destructive trigger tests, and cover foreign room moves plus fixture baseline counts. Co-authored-by: Thomas Klemm <github@tklemm.eu>
6 lines
232 B
Ruby
6 lines
232 B
Ruby
# schema.rb cannot dump SQLite triggers. Cover existing DBs that lost them.
|
|
Rails.application.config.after_initialize do
|
|
Room::MessagesCount.ensure!
|
|
rescue ActiveRecord::NoDatabaseError, ActiveRecord::ConnectionNotEstablished
|
|
end
|