aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
diff options
context:
space:
mode:
authorkares <self@kares.org>2014-05-14 12:42:36 +0200
committerkares <self@kares.org>2014-05-14 12:42:36 +0200
commit06e7fec55af378e250883d40dcd62b641cc0ea4d (patch)
tree9f640b31b59f4e90897feb3323058993cb4c7fff /activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
parent6822dfad31786d6c297e749e422e66b195cc70d1 (diff)
downloadrails-06e7fec55af378e250883d40dcd62b641cc0ea4d.tar.gz
rails-06e7fec55af378e250883d40dcd62b641cc0ea4d.tar.bz2
rails-06e7fec55af378e250883d40dcd62b641cc0ea4d.zip
PostgreSQL's SchemaStatements seems a could candidate for re-use (with AR-JDBC)
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb8
1 files changed, 2 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
index 5bf4c7afd6..8f95b65507 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb
@@ -1,6 +1,6 @@
module ActiveRecord
module ConnectionAdapters
- class PostgreSQLAdapter < AbstractAdapter
+ module PostgreSQL
class SchemaCreation < AbstractAdapter::SchemaCreation
private
@@ -33,10 +33,6 @@ module ActiveRecord
end
end
- def schema_creation
- SchemaCreation.new self
- end
-
module SchemaStatements
# Drops the database specified on the +name+ attribute
# and creates it again using the provided +options+.
@@ -101,7 +97,7 @@ module ActiveRecord
# If the schema is not specified as part of +name+ then it will only find tables within
# the current schema search path (regardless of permissions to access tables in other schemas)
def table_exists?(name)
- schema, table = Utils.extract_schema_and_table(name.to_s)
+ schema, table = PostgreSQLAdapter::Utils.extract_schema_and_table(name.to_s)
return false unless table
exec_query(<<-SQL, 'SCHEMA').rows.first[0].to_i > 0