diff --git a/activerecord/lib/active_record/database_configurations/database_config.rb b/activerecord/lib/active_record/database_configurations/database_config.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/database_configurations/database_config.rb
+++ b/activerecord/lib/active_record/database_configurations/database_config.rb
@@ -7,7 +7,7 @@ module ActiveRecord
     # as this is the parent class for the types of database configuration objects.
     class DatabaseConfig # :nodoc:
       attr_reader :env_name, :name, :spec_name
-      deprecate :spec_name, "spec_name accessors are deprecated and will be removed in Rails 6.2, please use name instead."
+      deprecate spec_name: "please use name instead"
 
       attr_accessor :owner_name
 
diff --git a/activerecord/lib/active_record/tasks/database_tasks.rb b/activerecord/lib/active_record/tasks/database_tasks.rb
index <HASH>..<HASH> 100644
--- a/activerecord/lib/active_record/tasks/database_tasks.rb
+++ b/activerecord/lib/active_record/tasks/database_tasks.rb
@@ -106,7 +106,7 @@ module ActiveRecord
       def spec
         @spec ||= "primary"
       end
-      deprecate :spec, "spec_name accessors are deprecated and will be removed in Rails 6.2, please use name instead."
+      deprecate spec: "please use name instead"
 
       def name
         @name ||= "primary"
Remove duplicate part from deprecation warning

Before:

```
DEPRECATION WARNING: spec_name is deprecated and will be removed from Rails <I> (spec_name accessors are deprecated and will be removed in Rails <I>, please use name instead.)
```

After:

```
DEPRECATION WARNING: spec_name is deprecated and will be removed from Rails <I> (please use name instead)
```

Follow up of #<I>.