Fix 'Migration#pending_migrations?'
This commit is contained in:
parent
31600100d2
commit
0bfb2309c8
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue