The following main/replica database structure
development:
primary:
<<: *default
database: users_development
username: deploy_root
password: password
host: "localhost"
migrations_paths: db/user_migrate
primary_replica:
<<: *default
database: users_development
username: deploy_readonly
password: password
host: "localhost"
replica: true
has defined as its main AR defined as:
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
connects_to database: { writing: :primary, reading: :primary_replica }
end
However, when The following commands are run following the suggested syntax by the rails guides
rails generate devise User nick avatar --database users
bin/rails db:migrate
the only response is a prompt. Two problems arise:
the migration is created but not in the proper directory
migrations_paths: db/user_migrate
Logging into the database
users_development=# \dt
returns, consistently with the prompt replyDid not find any relations.
In other words the table was not created (which is confirmed by theschema.rb
file being unaltered
is specifying migrations_paths
with a sub directory a mistake for the primary database connection?
Or should rails generate devise User nick avatar --database users
invoke primary
in lieu of users
?