diff options
author | John Hawthorn <john@hawthorn.email> | 2019-07-29 11:06:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-29 11:06:27 -0700 |
commit | 8b0b591296448dd4dff5b85dbbbaf35f01f31e69 (patch) | |
tree | 80792c0c18613857ce980df41f01ff1771959a00 /activerecord/lib/active_record/tasks/postgresql_database_tasks.rb | |
parent | e0b19a3622e9d6d328dde174165ac03719f565c4 (diff) | |
parent | 69700c9ee760c5880fc80af70a89b42bb791cf98 (diff) | |
download | rails-8b0b591296448dd4dff5b85dbbbaf35f01f31e69.tar.gz rails-8b0b591296448dd4dff5b85dbbbaf35f01f31e69.tar.bz2 rails-8b0b591296448dd4dff5b85dbbbaf35f01f31e69.zip |
Merge pull request #36782 from jhawthorn/move_database_exists_to_adapter
Move DatabaseAlreadyExists detection to DB adapter
Diffstat (limited to 'activerecord/lib/active_record/tasks/postgresql_database_tasks.rb')
-rw-r--r-- | activerecord/lib/active_record/tasks/postgresql_database_tasks.rb | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb index 626ffdfdf9..fc37db216d 100644 --- a/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb +++ b/activerecord/lib/active_record/tasks/postgresql_database_tasks.rb @@ -21,12 +21,6 @@ module ActiveRecord connection.create_database configuration["database"], configuration.merge("encoding" => encoding) establish_connection configuration - rescue ActiveRecord::StatementInvalid => error - if error.cause.is_a?(PG::DuplicateDatabase) - raise DatabaseAlreadyExists - else - raise - end end def drop |