Skip to content

Commit

Permalink
restore unnecessary change
Browse files Browse the repository at this point in the history
  • Loading branch information
joseramonc committed Oct 12, 2023
1 parent 44e77b6 commit 7778ebe
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ def new_column_from_field(table_name, field, _definitions)
type_metadata = fetch_type_metadata(column_name, type, oid.to_i, fmod.to_i)
default_value = extract_value_from_default(default)

default_function = if attgenerated.present?
default
else
extract_default_function(default_value, default)
end
if attgenerated.present?
default_function = default
else
default_function = extract_default_function(default_value, default)
end

if (match = default_function&.match(/\Anextval\('"?(?<sequence_name>.+_(?<suffix>seq\d*))"?'::regclass\)\z/))
serial = sequence_name_from_parts(table_name, column_name, match[:suffix]) == match[:sequence_name]
Expand Down

0 comments on commit 7778ebe

Please sign in to comment.