From 1465f9cee27a55b5c13bad35bac74be119097f17 Mon Sep 17 00:00:00 2001 From: Marcel Molina Date: Mon, 26 Sep 2005 21:30:12 +0000 Subject: Make migrations honor table name prefixes and suffixes. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2352 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- .../active_record/connection_adapters/abstract/schema_statements.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/lib/active_record/connection_adapters') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index 81ddb3e2bb..d7aefc9a82 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -102,8 +102,8 @@ module ActiveRecord def initialize_schema_information #:nodoc: begin - execute "CREATE TABLE schema_info (version #{type_to_sql(:integer)})" - execute "INSERT INTO schema_info (version) VALUES(0)" + execute "CREATE TABLE #{ActiveRecord::Migrator.schema_info_table_name} (version #{type_to_sql(:integer)})" + execute "INSERT INTO #{ActiveRecord::Migrator.schema_info_table_name} (version) VALUES(0)" rescue ActiveRecord::StatementInvalid # Schema has been intialized end @@ -112,7 +112,7 @@ module ActiveRecord def dump_schema_information #:nodoc: begin if (current_schema = ActiveRecord::Migrator.current_version) > 0 - return "INSERT INTO schema_info (version) VALUES (#{current_schema});" + return "INSERT INTO #{ActiveRecord::Migrator.schema_info_table_name} (version) VALUES (#{current_schema});" end rescue ActiveRecord::StatementInvalid # No Schema Info -- cgit v1.2.3