Use the Same (Fly.io) PostgreSQL Instance for both Auth and Email App(s)
- Dominant language
- Elixir
- Stars
- 141
- Forks
- 8
- PR merge metrics
- No merged PRs in 30d
Description
At present our Two Heroku Apps [**`auth`**](https://github.com/dwyl/auth) [dwylauth.herokuapp.com](https://dwylauth.herokuapp.com) and [**`email`**](https://github.com/dwyl/email) [dwylmail.herokuapp.com](https://dwylmail.herokuapp.com) have _separate_ PostgreSQL databases. This is fine during development where we _want_ a separation of concerns so that we can develop+test the apps independently. But ultimately it doesn't make sense to have separate DBs in production because we are storing _related_ data in both. _Specifically_ the fact that an email address is **`verified`** for a given person.
Thankfully, the schemas are almost identical so it should not be much effort to migrate the email-specific tables to the **`auth`** App DB and rework the **`email`** App to use them. I still think we should have a separate email service so that people developing the **`Auth`** App don't need AWS credentials. But behind the scenes the DB can be the same in Production.
The
# Todo
+ [ ] Assess the complexity of migrating the **`email`** App to use the **`auth`** App DB on Heroku
+ [ ] Backup the **`email`** DB
+ [ ] Perform the Migration to have the **`sent`** table in the **`auth`** DB
+ [ ] Switch over the **`email`** App to use the **`auth`** DB
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.