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

Stephan/refactor/alembic init #602

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Conversation

SteBaum
Copy link
Contributor

@SteBaum SteBaum commented Jun 11, 2024

Which issue(s) this PR fixes

Fixes None

Additional comments

Integrates Alembic in the tdp init command. If the database has already got an alembic_version table with a revision id it upgrades the tables, otherwise it creates them and puts the stamp of the current revision.

This PR includes all initial revision scripts.

Log level has been set to ERROR for the alembic logger so that the user normally does not see them.

Agreements

@SteBaum SteBaum self-assigned this Jun 11, 2024
@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch from 11e8884 to cf2f003 Compare June 11, 2024 11:39
@SteBaum SteBaum requested review from PaulFarault and rpignolet June 11, 2024 11:42
Copy link
Contributor

@PaulFarault PaulFarault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This means that we want to use the tdp init command for both initialization AND migration?

tdp/cli/commands/init.py Outdated Show resolved Hide resolved
tdp/cli/commands/init.py Outdated Show resolved Hide resolved
tdp/cli/commands/init.py Outdated Show resolved Hide resolved
@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch 4 times, most recently from 61b0c99 to 9abc0dd Compare June 12, 2024 09:33
@SteBaum SteBaum requested a review from PaulFarault June 12, 2024 09:34
tdp/cli/commands/init.py Outdated Show resolved Hide resolved
tdp/cli/commands/init.py Show resolved Hide resolved
@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch 2 times, most recently from 63e8d5c to 500e9cc Compare June 20, 2024 10:05
@SteBaum SteBaum requested a review from PaulFarault June 20, 2024 10:06
@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch from 500e9cc to aa21716 Compare June 25, 2024 15:45
@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch from aa21716 to d4a6e2f Compare June 26, 2024 07:05
@SteBaum
Copy link
Contributor Author

SteBaum commented Jun 26, 2024

alembic_migration folder and alembic.ini have been moved into the folder tdp so that they are included in the packaging.

@SteBaum SteBaum force-pushed the stephan/refactor/alembic-init branch from d4a6e2f to 42aa712 Compare July 3, 2024 14:59
@PaulFarault PaulFarault marked this pull request as draft December 3, 2024 09:47
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 this pull request may close these issues.

2 participants