Permalink
Browse files

fixing "view" location in rendered SQL

  • Loading branch information...
1 parent 6d6052a commit 434884ea70424525d413c88ccf6c89c6dfb9b5d8 Elad Meidar committed Nov 12, 2009
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/plain_view/connection_adapters/abstract/schema_statements.rb
@@ -20,14 +20,14 @@ def create_view(name, options={})
drop_view(name) rescue nil
end
- create_sql = "CREATE VIEW "
+ create_sql = "CREATE "
if view_definition.has_algorithm?
create_sql << "ALGORITHM=#{view_definition.algorithm} "
end
if view_definition.has_security?
create_sql << "SQL SECURITY #{view_definition.security} "
end
- create_sql << "#{quote_table_name(name)} "
+ create_sql << "VIEW #{quote_table_name(name)} "
if supports_view_columns_definition? && !view_definition.to_sql.blank?
create_sql << "("
create_sql << view_definition.to_sql

0 comments on commit 434884e

Please sign in to comment.