Sha256: 015d26af665e46eba4bbd12c22be01e75061ee272cb6d503c3ceb3a7f047ffc2

Contents?: true

Size: 980 Bytes

Versions: 13

Compression:

Stored size: 980 Bytes

Contents

require File.join(PROJECT_ROOT, 'lib', 'composite_primary_keys')
require File.join(PROJECT_ROOT, 'test', 'connections', 'connection_spec')

namespace :sqlserver do
  desc 'Build the SQL Server test database'
  task :build_database => :load_connection do
    options_str = connection_string

    schema = File.join(PROJECT_ROOT, 'test', 'fixtures', 'db_definitions', 'sqlserver.sql')
    sh %( sqsh #{options_str} -i #{schema} )
  end

  desc 'Drop the SQL Server test database'
  task :drop_database => :load_connection do 
    options_str = connection_string
    
    schema = File.join(PROJECT_ROOT, 'test', 'fixtures', 'db_definitions', 'sqlserver.drop.sql')
    sh %( sqsh #{options_str} -i #{schema} )
  end

  desc 'Rebuild the SQL Server test database'
  task :rebuild_database => [:drop_database, :build_database]

  task :load_connection do
    require File.join(PROJECT_ROOT, "test", "connections", "native_sqlserver", "connection")
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
composite_primary_keys-8.1.8 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.7 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.6 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.5 tasks/databases/sqlserver.rake
composite_primary_keys-9.0.4 tasks/databases/sqlserver.rake
composite_primary_keys-9.0.2 tasks/databases/sqlserver.rake
composite_primary_keys-9.0.1 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.4 tasks/databases/sqlserver.rake
composite_primary_keys-9.0.0 tasks/databases/sqlserver.rake
composite_primary_keys-9.0.0.beta1 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.3 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.2 tasks/databases/sqlserver.rake
composite_primary_keys-8.1.1 tasks/databases/sqlserver.rake