Module: StructureSqlMergeDriver::MySQL

Defined in:
lib/git-merge-structure-sql.rb

Constant Summary collapse

RE_DUMP_TIMESTAMP =
/^-- Dump completed on \K.+$/
RE_AUTO_INCREMENT_VALUE =
/^\)(?= ).*\K AUTO_INCREMENT=\d+(?=.*;$)/
RE_VERSION =
/^INSERT INTO schema_migrations \(version\) VALUES \('(\d+)'\);\s+/
RE_VERSIONS =
/#{RE_VERSION}+/

Class Method Summary collapse

Class Method Details

.match?(content) ⇒ Boolean

Returns:

  • (Boolean)


81
82
83
# File 'lib/git-merge-structure-sql.rb', line 81

def match?(content)
  /^-- MySQL dump / === content
end

.merge!(*contents) ⇒ Object



85
86
87
88
89
# File 'lib/git-merge-structure-sql.rb', line 85

def merge!(*contents)
  merge_dump_timestamps!(*contents)
  scrub_auto_increment_values!(*contents)
  merge_versions!(*contents)
end