Skip to content

Commit

Permalink
Merge pull request #5 from fiscal-cliff/master
Browse files Browse the repository at this point in the history
Skip plugin initialization process if versions table does not exist
  • Loading branch information
JosephHalter committed Aug 4, 2016
2 parents b6e189f + a966bb6 commit 6119f7c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/sequel/plugins/bitemporal.rb
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def self.bitemporal_excluded_columns
def self.configure(master, opts = {})
version = opts[:version_class]
raise Error, "please specify version class to use for bitemporal plugin" unless version
return version.db.log_info("Version table does not exist for #{version.name}") unless version.db.table_exists?(version.table_name)
missing = bitemporal_version_columns - version.columns
raise Error, "bitemporal plugin requires the following missing column#{"s" if missing.size>1} on version class: #{missing.join(", ")}" unless missing.empty?

Expand Down

0 comments on commit 6119f7c

Please sign in to comment.