mardi 15 septembre 2020

database.yml with postgres schema

I'm cloning a remote postgresql database to my local dev in order to run some tests, in the remote db the data I need is actually in a schema within the db, I haven't figured out how to remove schema name from the dump, so I guess I'll be working with local data in a schema within the db.

I couldn't find any documentation about how to configure database.yml to specify the database and schema to be used for the connection.

Here's my database.yml so far, (not working)

development:
  adapter: postgresql
  database: <%=ENV['DATABASE_NAME']%>
  schema: schema_name
  host: <%=ENV['DATABASE_HOST']%>
  username: <%=ENV['DATABASE_USER_NAME']%>
  password: <%=ENV['DATABASE_PASSWORD']%>
  pool: <%=ENV['RAILS_MAX_THREADS'] || 5 %>
  timeout: 5000

any ideas?

Aucun commentaire:

Enregistrer un commentaire