aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters
diff options
context:
space:
mode:
authorMichael Koziarski <michael@koziarski.com>2010-04-09 11:29:53 +1200
committerMichael Koziarski <michael@koziarski.com>2010-04-09 11:30:40 +1200
commit1e3dce08e11bd11e7d774512ea599166c4c45378 (patch)
treec8270c4ce23dbaf3701501fd5f50624761033ecd /activerecord/lib/active_record/connection_adapters
parent82514c2897a43ab58239af1fb24f8f0de2a0d989 (diff)
downloadrails-1e3dce08e11bd11e7d774512ea599166c4c45378.tar.gz
rails-1e3dce08e11bd11e7d774512ea599166c4c45378.tar.bz2
rails-1e3dce08e11bd11e7d774512ea599166c4c45378.zip
Revert "When creating database with rake, create schemas in schema_search_path if it doesn't exist."
This reverts commit 6c2a0675f11a9b5b8e88ed7dbccd65cb51be8029. Reverting because it breaks the ability to run tests using a non-superuser. Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb activerecord/lib/active_record/railties/databases.rake
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb21
1 files changed, 0 insertions, 21 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
index 2395a744a3..68ee88bba4 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
@@ -658,27 +658,6 @@ module ActiveRecord
end
end
- # Creates a schema for the given user
- #
- # Example:
- # create_schema('products', 'postgres')
- def create_schema(schema_name, pg_username)
- execute("CREATE SCHEMA \"#{schema_name}\" AUTHORIZATION \"#{pg_username}\"")
- end
-
- # Drops a schema
- #
- # Example:
- # drop_schema('products')
- def drop_schema(schema_name)
- execute("DROP SCHEMA \"#{schema_name}\"")
- end
-
- # Returns an array of all schemas in the database
- def all_schemas
- query('SELECT schema_name FROM information_schema.schemata').flatten
- end
-
# Returns the list of all tables in the schema search path or a specified schema.
def tables(name = nil)
query(<<-SQL, name).map { |row| row[0] }