Skip to content
This repository has been archived by the owner on Dec 22, 2020. It is now read-only.

avoid logging creating table if the table is not actually created #58

Open
wants to merge 1 commit into
base: master
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
4 changes: 3 additions & 1 deletion lib/mosql/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,9 @@ def create_schema(db, clobber=false)
meta = collection[:meta]
composite_key = meta[:composite_key]
keys = []
log.info("Creating table '#{meta[:table]}'...")
if clobber
log.info("Creating table '#{meta[:table]}'...")
end
db.send(clobber ? :create_table! : :create_table?, meta[:table]) do
collection[:columns].each do |col|
opts = {}
Expand Down