Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change the database backend #192

Closed
TooAngel opened this issue Oct 8, 2020 · 2 comments · Fixed by #218
Closed

Change the database backend #192

TooAngel opened this issue Oct 8, 2020 · 2 comments · Fixed by #218
Assignees

Comments

@TooAngel
Copy link
Owner

TooAngel commented Oct 8, 2020

The current MongoDB provider mLab will shutdown by 2020-11-01. Another MongoDB addon provider needs to be choose and the database needs to be migrated.

How (I would sketch right now how) it should be done for a real World Driven service

The add-on configuration is somewhere stored in the repository (maybe app.json).
A new Pull Request is created adding the new addon. When this is merged the CI server will read that config file and provisions the new database

A second Pull Request is created indicates that the data needs to be migrated and the system should use the new database afterward. (Maybe with a maintenance page in between, would be cool if we don have to)

A third Pull Request removes the old database and the CI server will make sure the database is removed.

How I would do it now

Yeah, do it manually. (If someone is interested in preparing the proper process, we could do the first steps)

@TooAngel TooAngel self-assigned this Oct 8, 2020
@TooAngel
Copy link
Owner Author

TooAngel commented Oct 12, 2020

Heroku does not provide any free MongoDB addon. The smallest plan ist 46$/month, which I don't want to spend for a pet project right now.
I added the JawsDB Maria addon and will change the database backend from MongoDB to MariaDB using https://flask-migrate.readthedocs.io/en/latest/ for database setup, Flask-SQLAlchemy as ORM.

Any opinions?

@IanFindlay
Copy link
Contributor

Sounds great to me. I've been putting off installing MongoDB as I run Arch and it has been removed from official repositories whereas MariaDB is the default MySQL.

TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 9, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
TooAngel added a commit that referenced this issue Nov 10, 2020
The MongoDB addon used on heroku will shutdown soonish.
Instead of MongoDB PostgreSQL is now used.
Fixes #192

Flask-SQLAlchemy as ORM.
Flask-Migrate handling the migration

On app startup the existing data is automatically migrated.

The github access keys are now stored encrypted, the encryption key is
provided as `ENCRYPTION_KEY` as environment variable.
Fixes #197

Fixes #49 - The session are and will be stored in the database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants