diff --git a/lib/sequel/plugins/bulk_audit.rb b/lib/sequel/plugins/bulk_audit.rb index 3234f75..d414ad9 100644 --- a/lib/sequel/plugins/bulk_audit.rb +++ b/lib/sequel/plugins/bulk_audit.rb @@ -25,7 +25,7 @@ def with_current_user(current_user, attributes = nil) Sequel.cast(current_user&.login || "unspecified", :text).as(:username), Sequel.pg_jsonb(model_to_table_map).as(:model_map), Sequel.pg_jsonb(attributes || {}).as(:data)) - self.db.create_table!(:"__audit_info_#{trid}", temp: true, as: data) + self.db.create_table?(:"__audit_info_#{trid}", temp: true, as: data) result = yield if block_given? self.db.drop_table?(:"__audit_info_#{trid}") result