-
Notifications
You must be signed in to change notification settings - Fork 7
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
docs: ADR for alembic migrations #56
Conversation
Thanks for the pull request, @Ian2012! Please note that it may take us up to several weeks or months to complete a review and merge your PR. Feel free to add as much of the following information to the ticket as you can:
All technical communication about the code itself will be done via the GitHub pull request interface. As a reminder, our process documentation is here. Please let us know once your PR is ready for our review and all tests are green. |
fb15024
to
78a3462
Compare
Context | ||
******* | ||
|
||
Alembic is a migration tool for SQLAlchemy. It is used to manage the clickhouse database |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: ClickHouse
Alembic is a migration tool for SQLAlchemy. It is used to manage the clickhouse database | ||
schema for the Aspects project. | ||
|
||
Alembic has support for branching migrations and multiple databases, it creates a migrations |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we add that it supports migration rollbacks too?
the order in which migrations were created and executed. | ||
#. Migrations cannot be modified once they are released to production. If a migration | ||
needs to be modified, a new migration should be created with a new sequential ID. | ||
#. The alembic migrations table is highly couple with the xAPI database, for this the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What do you think about adding different Alembic project for other databases (with their own co-located migrations table) like the event sink and vector?
nit: "highly couple" -> "highly coupled"
nit: "for this the" -> "for this reason the"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like it, it's better than my approach and would reflect the project's progress better
************ | ||
|
||
* Users should not run migrations manually. They should be run automatically by Tutor | ||
when the LMS is started. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: Maybe "when init is run, and at upgrade time"?
Rejected Alternatives | ||
********************* | ||
|
||
**Clickhouse SQL Alchemy Models** |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also rejected Django for this
78a3462
to
0841aea
Compare
@bmtcril ready |
0841aea
to
ad5ca03
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@Ian2012 🎉 Your pull request was merged! Please take a moment to answer a two question survey so we can improve your experience in the future. |
Description
This PR adds documentation about the alembic migrations tool