Skip to content
Browse files

Merge branch 'hotfix/reset_timeout' into develop

  • Loading branch information...
2 parents df4f19c + a29fd7c commit 6842bb53a7a4840b0c738312cdd0c9f18faf5af6 @tokumine tokumine committed May 7, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/table.rb
View
2 app/models/table.rb
@@ -1431,7 +1431,7 @@ def set_the_geom_column!(type = nil)
unless user_database.schema(name.to_sym, :reload => true).flatten.include?(THE_GEOM_WEBMERCATOR)
updates = true
user_database.run("SELECT AddGeometryColumn ('#{self.name}','#{THE_GEOM_WEBMERCATOR}',#{CartoDB::GOOGLE_SRID},'#{type}',2)")
- user_database.run("SET statement_timeout TO 0;UPDATE #{self.name} SET #{THE_GEOM_WEBMERCATOR}=CDB_TransformToWebmercator(#{THE_GEOM}) WHERE #{THE_GEOM} IS NOT NULL")
+ user_database.run("SET statement_timeout TO 0;UPDATE #{self.name} SET #{THE_GEOM_WEBMERCATOR}=CDB_TransformToWebmercator(#{THE_GEOM}) WHERE #{THE_GEOM} IS NOT NULL;SET statement_timeout TO DEFAULT")
user_database.run("CREATE INDEX ON #{self.name} USING GIST(#{THE_GEOM_WEBMERCATOR})")
# user_database.run("ALTER TABLE #{self.name} ADD CONSTRAINT geometry_valid_check CHECK (ST_IsValid(#{THE_GEOM}))")

0 comments on commit 6842bb5

Please sign in to comment.
Something went wrong with that request. Please try again.