lib/strong_migrations/checker.rb in strong_migrations-0.6.1 vs lib/strong_migrations/checker.rb in strong_migrations-0.6.2
- old
+ new
@@ -264,10 +264,11 @@
end
def postgresql_version
@postgresql_version ||= begin
target_version(StrongMigrations.target_postgresql_version) do
- connection.select_all("SHOW server_version").first["server_version"]
+ # only works with major versions
+ connection.select_all("SHOW server_version_num").first["server_version_num"].to_i / 10000
end
end
end
def mysql?