From 91dfe23d6fa39d4bf996433015c0b7a8fddb1230 Mon Sep 17 00:00:00 2001
From: Guo Xiang Tan <tgx_world@hotmail.com>
Date: Thu, 12 Oct 2017 17:14:36 +0800
Subject: [PATCH] Exclude versions table when loading models in Unicorn.

---
 config/unicorn.conf.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb
index decabee44ea..bc47ed7e85e 100644
--- a/config/unicorn.conf.rb
+++ b/config/unicorn.conf.rb
@@ -66,7 +66,7 @@ before_fork do |server, worker|
     I18n.t(:posts)
 
     # load up all models and schema
-    (ActiveRecord::Base.connection.tables - %w[schema_migrations]).each do |table|
+    (ActiveRecord::Base.connection.tables - %w[schema_migrations versions]).each do |table|
       table.classify.constantize.first rescue nil
     end