We’re trying to duplicate the production environment that was mentioned in an article about iDream Interactive on the heroic labs blog.
On digital ocean we have an ubuntu droplet connected to their managed postgresql db service. I can connect to the database cluster using psql. But when I run the migrate up command, I get a response from the db saying the schema is outdated, and to run migrate up. Any ideas on this?
This is the command:
./nakama --database.address “user:password@nakama-db-postgresql-nyc1-55357-do-user-6724142-0.db.ondigitalocean.com:25060/nakama?sslmode=require” migrate up
this is nakama 2.7.0, and we haven’t imported any data so this is a fresh setup. Running that statement shows:
id | applied_at
----±-----------
(0 rows)
@oscargoldman Try the migrate command before the --database.address argument. So the command should look like: nakama migrate up --database.address .... Argument flags do not care about order, but subsommands are sensitive to it.
No, it’s a quirk of Postgres. By default users connect to a ‘database’ (schema) named the same as their username. Nakama takes advantage of this so it can check if the database ("nakama" in your case) is correctly set up. Create an empty database named the same as your user, it won’t be used beyond the migration process.