Skip to content
This repository was archived by the owner on Jul 31, 2023. It is now read-only.

Skip some default checks for non-mariaDB databases #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,9 @@ def new_column_from_field(table_name, field)
elsif type_metadata.type == :text && default&.start_with?("'")
# strip and unescape quotes
default = default[1...-1].gsub("\\'", "'")
elsif default&.match?(/\A\d/)
elsif mariadb? && default&.match?(/\A\d/)
# Its a number so we can skip the query to check if it is a function
elsif default && default_type(table_name, field_name) == :function
elsif mariadb? && default && default_type(table_name, field_name) == :function
default, default_function = nil, default
end

Expand Down