I have an app that I am migrating to Deis and want to use RDS for my Postgres instance. I have Postgres set up but if i run rake db:create:all from my local machine, configured to point to RDS, I get:
This task only modifies local databases. <db_name> is on a remote host.
Is there a way to create the DB from an existing migration or the schema.rb file?
Update 1
Here is the database.yml file. All environments inherit the default
default: &default
adapter: postgresql
encoding: utf8
pool: 5
username: <db user I created>
password: <PW>
host: <my_unique_host>.us-east-1.rds.amazonaws.com
port: 5432
Update 2
For the comment about just creating the DB then running db:migrate like normal, this is exactly the behavior I am not seeing. If I have the DB active and run rake db:migrate, the process completes and I am presented a new terminal line. No tables/columns are created.
Am I better off trying to do a local DB dump and restoring it into RDS?
Update 3: Solution I have resolved this and wanted to share my learnings:
- It appears that running the
rake db:migratecommand from a remote host was not working. This may be possible but I was not able to figure it out. - What solved it was actually SSH'ing into the app container in the Deis cluster and running
rake db:createandrake db:migrate. This ack'd back saying the table was created and I was able to verify in the psql prompt.
Hopefully this helps.