-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Description
This is the most critical phase. The goal is to move the production data from the manually-managed live schema into echo-base's migration-managed public schema on the same EC2 instance, same PostgreSQL installation.
Step 1: Back Up the Production Database
Keep this backup somewhere and test restoring it to a local postgres to verify it's valid.
Step 2: Create a New Database for Echo-Base
We have a couple options here.
- Rather than modifying the existing database and applying the migrations there, we could create a separate database. This way the old one is untouched and you can roll back by just pointing back to the old one.
- As we do in the dev environment right now, we spin up a postgres container instead of having it live directly on the instance and expose the port for the echo-base container to use.
Step 3: Run Echo-Base Migrations on the New Database
Point EB_DSN at the new database and run sql-migrate up -env=production
This creates the gamer_profile, gamer_activity, and application tables as needed. Another way to do this is to create a new table called migrations and "fake" a migration by putting the first one in database.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels