diff options
author | kennyj <kennyj@gmail.com> | 2013-03-28 03:07:51 +0900 |
---|---|---|
committer | kennyj <kennyj@gmail.com> | 2013-04-03 00:54:32 +0900 |
commit | 0f313fce1c35113170d5f110d8c17694535871c1 (patch) | |
tree | 81df00699837d939039d564b292974c54d1233d0 /activerecord/lib/active_record/railties | |
parent | 4a370f9d7cc56b03857e0d8a32f5321f911e1dfd (diff) | |
download | rails-0f313fce1c35113170d5f110d8c17694535871c1.tar.gz rails-0f313fce1c35113170d5f110d8c17694535871c1.tar.bz2 rails-0f313fce1c35113170d5f110d8c17694535871c1.zip |
Extract Sqlserver database tasks.
Diffstat (limited to 'activerecord/lib/active_record/railties')
-rw-r--r-- | activerecord/lib/active_record/railties/databases.rake | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/activerecord/lib/active_record/railties/databases.rake b/activerecord/lib/active_record/railties/databases.rake index 859b9c8ae6..cabc6be7bb 100644 --- a/activerecord/lib/active_record/railties/databases.rake +++ b/activerecord/lib/active_record/railties/databases.rake @@ -278,8 +278,6 @@ db_namespace = namespace :db do when 'oci', 'oracle' ActiveRecord::Base.establish_connection(current_config) File.open(filename, "w:utf-8") { |f| f << ActiveRecord::Base.connection.structure_dump } - when 'sqlserver' - `smoscript -s #{current_config['host']} -d #{current_config['database']} -u #{current_config['username']} -p #{current_config['password']} -f #{filename} -A -U` else ActiveRecord::Tasks::DatabaseTasks.structure_dump(current_config, filename) end @@ -297,8 +295,6 @@ db_namespace = namespace :db do current_config = ActiveRecord::Tasks::DatabaseTasks.current_config filename = ENV['DB_STRUCTURE'] || File.join(Rails.root, "db", "structure.sql") case current_config['adapter'] - when 'sqlserver' - `sqlcmd -S #{current_config['host']} -d #{current_config['database']} -U #{current_config['username']} -P #{current_config['password']} -i #{filename}` when 'oci', 'oracle' ActiveRecord::Base.establish_connection(current_config) IO.read(filename).split(";\n\n").each do |ddl| @@ -363,12 +359,6 @@ db_namespace = namespace :db do task :purge => [:environment, :load_config] do abcs = ActiveRecord::Base.configurations case abcs['test']['adapter'] - when 'sqlserver' - test = abcs.deep_dup['test'] - test_database = test['database'] - test['database'] = 'master' - ActiveRecord::Base.establish_connection(test) - ActiveRecord::Base.connection.recreate_database!(test_database) when "oci", "oracle" ActiveRecord::Base.establish_connection(:test) ActiveRecord::Base.connection.structure_drop.split(";\n\n").each do |ddl| |