dohmysql 0.2.3 → 0.2.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -93,6 +93,15 @@ private
93
93
 
94
94
  def apply_migrates(dbh, source_db)
95
95
  apply_files = find_files("#{source_db}/migrate/*_apply.sql")
96
+ apply_files.sort! do |valx, valy|
97
+ if valx.end_with?('_before_apply.sql')
98
+ -1
99
+ elsif valy.end_with?('_before_apply.sql')
100
+ 1
101
+ else
102
+ valx <=> valy
103
+ end
104
+ end
96
105
  DohDb.load_sql(@connector.config, apply_files)
97
106
  apply_files.each do |path|
98
107
  migrate_name = File.basename(path).slice(0..-11)
@@ -169,7 +169,7 @@ private
169
169
  values.push(if quote_strings || !value.is_a?(String) then value.to_sql else value end)
170
170
  end
171
171
 
172
- insert("#{keyword} INTO #{table} (#{names.join(',')}) VALUES (#{values.join(',')})")
172
+ insert("#{keyword} INTO #{table} (`#{names.join('`,`')}`) VALUES (#{values.join(',')})")
173
173
  end
174
174
 
175
175
  def get_row_builder(row_builder = nil)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dohmysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-05-23 00:00:00.000000000 Z
13
+ date: 2012-07-28 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: dohroot