提交 48cfb003 编写于 作者: R Ryuta Kamizono

Improve `create_table force: true`

Extra `data_source_exists?(table_name)` is unneeded if
`drop_table(table_name, if_exists: true)` directly.
上级 e51572dc
......@@ -273,8 +273,8 @@ def create_table(table_name, comment: nil, **options)
yield td if block_given?
if options[:force] && data_source_exists?(table_name)
drop_table(table_name, options)
if options[:force]
drop_table(table_name, **options, if_exists: true)
end
result = execute schema_creation.accept td
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册