Skip to content

Commit b7afcc7

Browse files
committed
Allow drop_database to be called even when DB does not exist.
1 parent 92d4b1b commit b7afcc7

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

CHANGELOG

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11

22
* 3.1.0 *
33

4+
* Allow drop_database to be called even when DB does not exist.
5+
46
* Remove totally broken ADONET connection mode. Want it back, submit a patch.
57

68
* Schema reflection now finds primary key for all occasions. Fixed #60 [Boško Ivanišević]

lib/active_record/connection_adapters/sqlserver/database_statements.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@ def drop_database(database)
179179
retry_count += 1
180180
remove_database_connections_and_rollback(database)
181181
retry
182+
elsif err.message =~ /does not exist/i
183+
nil
182184
else
183185
raise
184186
end

0 commit comments

Comments
 (0)