Skip to content

Commit

Permalink
Allow false/nil default values.
Browse files Browse the repository at this point in the history
# Conflicts:
#	lib/db/migrate/create_table.rb
  • Loading branch information
ioquatix committed May 30, 2021
1 parent f617771 commit 8500220
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/db/migrate/create_table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,8 @@ def call(session)
statement.clause("NOT NULL")
end

if default = options[:default]
statement.clause("DEFAULT").literal(default)
if options.key?(:default)
statement.clause("DEFAULT").literal(options[:default])
end

if unique = options[:unique]
Expand Down

0 comments on commit 8500220

Please sign in to comment.