Permalink
Browse files

rc4

  • Loading branch information...
1 parent a78c7c1 commit 5798b8c5c9808fd1b6dc797744a2525c29424735 @purzelrakete purzelrakete committed Jan 29, 2012
Showing with 14 additions and 3 deletions.
  1. +5 −0 CHANGELOG.md
  2. +8 −2 lib/lhm/sql_helper.rb
  3. +1 −1 lib/lhm/version.rb
View
5 CHANGELOG.md
@@ -1,3 +1,8 @@
+
+# 1.0.0.rc4 (January 29, 2012)
+
+* added '-- lhm' to the end of statements for more visibility
+
# 1.0.0.rc3 (January 19, 2012)
* Speedup migrations for tables with large minimum id
View
10 lib/lhm/sql_helper.rb
@@ -21,21 +21,27 @@ def table?(table_name)
end
def sql(statements)
- [statements].flatten.each { |statement| connection.execute(statement) }
+ [statements].flatten.each do |statement|
+ connection.execute(tagged(statement))
+ end
rescue ActiveRecord::StatementInvalid, Mysql::Error => e
error e.message
end
def update(statements)
[statements].flatten.inject(0) do |memo, statement|
- memo += connection.update(statement)
+ memo += connection.update(tagged(statement))
end
rescue ActiveRecord::StatementInvalid, Mysql::Error => e
error e.message
end
private
+ def tagged(statement)
+ statement + " -- lhm"
+ end
+
def column_definition(cols)
Array(cols).map do |column|
column.to_s.match(/`?([^\(]+)`?(\([^\)]+\))?/).captures
View
2 lib/lhm/version.rb
@@ -2,5 +2,5 @@
# Schmidt
module Lhm
- VERSION = "1.0.0.rc3"
+ VERSION = "1.0.0.rc4"
end

0 comments on commit 5798b8c

Please sign in to comment.