Class: ArJdbc::Tasks::MSSQLDatabaseTasks
Instance Attribute Summary
#configuration
Instance Method Summary
collapse
#charset, #collation, #create, #drop, #expand_path, #initialize, #resolve_database, #resolve_database_from_url
Instance Method Details
#purge ⇒ Object
7
8
9
10
11
12
13
|
# File 'lib/arjdbc/tasks/mssql_database_tasks.rb', line 7
def purge
test = deep_dup(configuration)
test_database = resolve_database(test)
test['database'] = 'master'
establish_connection(test)
connection.recreate_database!(test_database)
end
|
#structure_dump(filename) ⇒ Object
15
16
17
18
|
# File 'lib/arjdbc/tasks/mssql_database_tasks.rb', line 15
def structure_dump(filename)
config = config_from_url_if_needed
`smoscript -s #{config['host']} -d #{config['database']} -u #{config['username']} -p #{config['password']} -f #{filename} -A -U`
end
|
#structure_load(filename) ⇒ Object
20
21
22
23
|
# File 'lib/arjdbc/tasks/mssql_database_tasks.rb', line 20
def structure_load(filename)
config = config_from_url_if_needed
`sqlcmd -S #{config['host']} -d #{config['database']} -U #{config['username']} -P #{config['password']} -i #{filename}`
end
|