bin/ridgepole in ridgepole-0.7.2 vs bin/ridgepole in ridgepole-0.7.3.beta

- old
+ new

@@ -1,8 +1,7 @@ #!/usr/bin/env ruby $: << File.expand_path('../../lib', __FILE__) -require 'rubygems' require 'yaml' require 'optparse' require 'fileutils' require 'ridgepole' require 'ridgepole/cli/config' @@ -119,10 +118,11 @@ opt.on('', '--dump-without-table-options') { options[:dump_without_table_options] = true } opt.on('', '--dump-with-default-fk-name') { options[:dump_with_default_fk_name] = true } opt.on('', '--index-removed-drop-column') { options[:index_removed_drop_column] = true } opt.on('', '--skip-drop-table') { options[:skip_drop_table] = true } opt.on('', '--mysql-change-table-options') { options[:mysql_change_table_options] = true } + opt.on('', '--mysql-change-table-comment') { options[:mysql_change_table_comment] = true } opt.on('', '--check-relation-type DEF_PK') {|v| options[:check_relation_type] = v } opt.on('', '--ignore-table-comment') { options[:ignore_table_comment] = true } opt.on('', '--skip-column-comment-change') { options[:skip_column_comment_change] = true } opt.on('', '--allow-pk-change') { options[:allow_pk_change] = true } opt.on('', '--create-table-with-index') { options[:create_table_with_index] = true } @@ -237,41 +237,41 @@ differ = noop_migrate(delta, options) end else logger.verbose_info('# Update schema') - differ, out = delta.migrate( + differ, _out = delta.migrate( :external_script => options[:external_script], :alter_extra => options[:alter_extra] ) end unless differ logger.info('No change') end when :diff - diff_files = diff_files.map do |file| - if File.exist?(file) - file_ext = File.extname(file) + diff_files = diff_files.map do |diff_file| + if File.exist?(diff_file) + file_ext = File.extname(diff_file) if %w(.yml .yaml).include?(file_ext) - Ridgepole::Config.load(file, env) + Ridgepole::Config.load(diff_file, env) else - File.open(file) + File.open(diff_file) end else - YAML.load(file) + YAML.load(diff_file) end end delta = Ridgepole::Client.diff(*diff_files, options) if diff_with_apply logger.verbose_info('# Update schema') differ = delta.differ? if differ - differ, out = delta.migrate + differ, _out = delta.migrate end if differ logger.info('No change') end