From 7ac29cee87e6572ca7a1b7e4593bfcf98f6ef1f6 Mon Sep 17 00:00:00 2001 From: Stephen Binns Date: Tue, 6 Aug 2024 10:37:53 +0100 Subject: [PATCH] Add db migrate to smoke testing --- bin/que | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/bin/que b/bin/que index 148824d..b38d3f9 100755 --- a/bin/que +++ b/bin/que @@ -109,7 +109,16 @@ Que.logger ||= Logger.new($stdout) if options.ci require "active_record" + ActiveRecord::Base.establish_connection( + adapter: "postgresql", + host: ENV.fetch("PGHOST", "localhost"), + user: ENV.fetch("PGUSER", "postgres"), + password: ENV.fetch("PGPASSWORD", ""), + database: ENV.fetch("PGDATABASE", "que-test"), + ) + Que.connection = ActiveRecord + Que.migrate! end begin