-
Notifications
You must be signed in to change notification settings - Fork 2
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
Customize columns, drop callback, create table is optional #70
Conversation
Codecov Report
@@ Coverage Diff @@
## master #70 +/- ##
==========================================
+ Coverage 74.70% 76.41% +1.71%
==========================================
Files 15 15
Lines 676 687 +11
Branches 92 92
==========================================
+ Hits 505 525 +20
+ Misses 158 147 -11
- Partials 13 15 +2
Continue to review full report at Codecov.
|
ece583a
to
8d20d7f
Compare
Ready for review |
septentrion/db.py
Outdated
version_column=settings.VERSION_COLUMN, | ||
name_column=settings.NAME_COLUMN, | ||
applied_column=settings.APPLIED_COLUMN, | ||
).split() |
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.
Dumb question, why do we need to split & join the query? :)
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.
to remove line breaks.
in the past we had : 76138bb#diff-dcf2e67bd860136fb966a5112a6ab275L17
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.
Why do we need to remove line break, then ?
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.
You wrote the original code, so you tell me :)
Maybe it's not useful anymore, I didn't dig into that, as it's not the subject of that PR...
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.
Wow, it's hard to remember things from 2 years ago.
My guess would be a similar project I was inspired from was doing the same. I'm trying to remember if we were working on postgres tools at the time...
Today, my bet would be: if nothing justifies it, let's get rid of it. If we needed, we'll see it soon enough and re-add it with a comment !
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.
Clarifying! Let's get rid of it in another PR, some other time #71
septentrion/db.py
Outdated
with Query(settings=settings, query=query_migration_table_exists) as cur: | ||
result = next(cur) | ||
if result == [False]: | ||
return False |
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 already have "CREATE IF NOT EXISTS", I'm not sure what this brings to the table...? Couldn't we just always try to create the table (if not --no-create-table) ?
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 don't understand your comment, as this function is not about table creation.
Integrated wording changes and create table option fix.
I still have to do that. |
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.
Yay, 👏 ! Really really nice 🎉
(sorry it took some time to finish the review)
Note: I still need to add tests for the commits I added at the end. I'll be doing this asap !
9a0ef8a
to
35c143e
Compare
Co-authored-by: Joachim Jablon <[email protected]>
Instead of checking that the migration table exists, assume it does and catch the exception
We'll make this code cleaner in a subsequent PR
35c143e
to
c2eb024
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.
Congratulation on a non-trivial PR ! \o/
Cf. https://people-doc.atlassian.net/browse/PY-32
Ok I hope this will the last PR to allow septentrion to be used in peopledoc/django-north
It contains:
django_migration
table)Successful PR Checklist: