Skip to content

feat: add alembic configuration #220

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

Merged

Conversation

ellenc345
Copy link
Contributor

I've ran some tests to add and rollback a column. seems to work fine.

@ellenc345
Copy link
Contributor Author

review?

Copy link
Member

@yammesicka yammesicka left a comment

Choose a reason for hiding this comment

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

Awesome job! Added few of my insights :)

@@ -0,0 +1,86 @@
# A generic, single database configuration.
Copy link
Member

Choose a reason for hiding this comment

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

Please move all the alembic directory structure into app/database/alembic

Copy link
Member

Choose a reason for hiding this comment

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

If possible, move the configurations to config.py.example

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Can you please alborate why do that?
this file is runing when you call the alembic into action. this is the standart config that is well documented and it is clear to maintain it. if you whant to override things you can alwayys do it in alembic/env.py file.
but as I see it i wouldn't mix that config with the rest of the custom code configuration.
Ill be glad to hear your opinion about that.

Copy link
Member

Choose a reason for hiding this comment

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

I'd like to avoid making the user edit multiple configuration files, but now I see that the user shouldn't really touch anything here, so I guess it's cool

@codecov-io
Copy link

codecov-io commented Feb 21, 2021

Codecov Report

Merging #220 (e6c4375) into develop (fe4cab9) will decrease coverage by 0.73%.
The diff coverage is 0.00%.

Impacted file tree graph

@@             Coverage Diff             @@
##           develop     #220      +/-   ##
===========================================
- Coverage    98.05%   97.32%   -0.74%     
===========================================
  Files           73       74       +1     
  Lines         3194     3218      +24     
===========================================
  Hits          3132     3132              
- Misses          62       86      +24     
Impacted Files Coverage Δ
app/database/alembic/env.py 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fe4cab9...e6c4375. Read the comment docs.

@@ -0,0 +1,86 @@
# A generic, single database configuration.
Copy link
Member

Choose a reason for hiding this comment

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

If possible, move the configurations to config.py.example

@@ -0,0 +1,86 @@
# A generic, single database configuration.
Copy link
Member

Choose a reason for hiding this comment

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

I'd like to avoid making the user edit multiple configuration files, but now I see that the user shouldn't really touch anything here, so I guess it's cool

@yammesicka yammesicka merged commit b91708d into PythonFreeCourse:develop Feb 22, 2021
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.

3 participants