Sha256: 32099e300ad1e175ee99d9e7889c3494be7a86c0090aa7bc4828eb32ba38acc2
Contents?: true
Size: 1003 Bytes
Versions: 44
Compression:
Stored size: 1003 Bytes
Contents
require 'flydata/source/sync_generate_table_ddl' require 'flydata/source_mysql/mysql_compatibility_check' require 'flydata-core/mysql/command_generator' module Flydata module SourceMysql class SyncGenerateTableDdl < Source::SyncGenerateTableDdl def run_compatibility_check MysqlCompatibilityCheck.new(dp, de['mysql_data_entry_preference']).check if `which mysqldump`.empty? raise "mysqldump is not installed. mysqldump is required to run the command" end %w(host username database).each do |conf_name| raise "MySQL `#{conf_name}` is neither defined in the data entry nor the local config file" if de['mysql_data_entry_preference'][conf_name].to_s.empty? end end private def data_source_type_display_name "MySQL database" end def data_entry_prefs de['mysql_data_entry_preference'] end def each_source_tabledef(tables, options, &block) FlydataCore::Mysql::CommandGenerator.each_mysql_tabledef(tables, options, &block) end end end end
Version data entries
44 entries across 44 versions & 1 rubygems