I have seperated the models and DB directory to a separate shared repository from the source application repository in order to use this shared repostory as a library/shared directory with other applications.
I have implemented this by using subtrees but I could not access the schema.rb file which is now present in the shared directory created in the source application
have made changes in application.rb for accessing models, model concerns and db directory from the shared directory as below
config.paths['db'] << "#{root}/shared/db"
config.paths['app/models'] << "#{root}/shared/models"
config.paths.add("#{root}/shared/models/concerns", eager_load: true)
db directory contains "migrate" directory, schema.rb and seeds.rb
Models and its concerns are working fine but db directory cannot be accessed.
schema.rbfile?config/database.ymlfile.