From 0bfb2309c8ccf063463492a1f8ffb255160b556c Mon Sep 17 00:00:00 2001 From: 0x1eef <0x1eef@protonmail.com> Date: Sat, 27 Apr 2024 02:36:02 -0300 Subject: [PATCH] Fix 'Migration#pending_migrations?' --- server/lib/twenty/server/migration.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/server/lib/twenty/server/migration.rb b/server/lib/twenty/server/migration.rb index 23f0fea..852ac81 100644 --- a/server/lib/twenty/server/migration.rb +++ b/server/lib/twenty/server/migration.rb @@ -1,10 +1,11 @@ # frozen_string_literal: true module Twenty::Migration - require "sequel/extensions/migration" + Sequel.extension(:migration) + ## # @return [String] - # Returns the path to twenty's migrations. + # Returns the path to the migrations directory def self.migrations_path File.join(__dir__, "migration") end @@ -18,8 +19,8 @@ module Twenty::Migration ## # @return [Boolean] - # Returns true when there are pending migrations. + # Returns true when there are pending migrations def self.pending_migrations? - Sequel::Migrator.is_current?(Twenty.connection, migrations_path) + ! Sequel::Migrator.is_current?(Twenty.connection, migrations_path) end end