-
Notifications
You must be signed in to change notification settings - Fork 25
Feature/add schema selection #7
base: master
Are you sure you want to change the base?
Conversation
pgdatadiff/pgdatadiff.py
Outdated
| def __init__(self, firstdb, seconddb, schema, chunk_size=10000, count_only=False, exclude_tables=""): | ||
| firstsession, firstengine = make_session(firstdb) | ||
| secondsession, secondengine = make_session(seconddb) | ||
| secondsession, secondengine = make_session(seconddb,) |
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.
@andrikoz , is needed here? 🤔
| class DBDiff(object): | ||
|
|
||
| def __init__(self, firstdb, seconddb, chunk_size=10000, count_only=False): | ||
| def __init__(self, firstdb, seconddb, schema, chunk_size=10000, count_only=False, exclude_tables=""): |
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.
@andrikoz Shall we follow the exclude_tables pattern here instead?
schema="public"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.
Yup, I agree
pgdatadiff/main.py
Outdated
| __doc__, version=pkg_resources.require("pgdatadiff")[0].version) | ||
| first_db_connection_string=arguments['--firstdb'] | ||
| second_db_connection_string=arguments['--seconddb'] | ||
| arguments['--schema'] = 'public' if not arguments['--schema'] else True |
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.
@andrikoz based on default values suggestion below, we can just remove it!
e74141e to
09cb60f
Compare
09cb60f to
43fbf16
Compare
|
This is assuming the same schema for both dbs though right? What about 2 different schemas which is what this issue is asking. |
No description provided.