Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Feature/add schema selection #7

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

andrikoz
Copy link

@andrikoz andrikoz commented Feb 9, 2021

No description provided.

firstsession, firstengine = make_session(firstdb)
secondsession, secondengine = make_session(seconddb)
secondsession, secondengine = make_session(seconddb,)
Copy link

Choose a reason for hiding this comment

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

@andrikoz , is needed here? 🤔

@@ -19,9 +19,9 @@ def make_session(connection_string):

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=""):
Copy link

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"

Copy link
Author

Choose a reason for hiding this comment

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

Yup, I agree

@@ -26,14 +28,17 @@ def main():
__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
Copy link

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!

@andrikoz andrikoz force-pushed the feature/add-schema-selection branch from e74141e to 09cb60f Compare February 9, 2021 11:51
@andrikoz andrikoz force-pushed the feature/add-schema-selection branch from 09cb60f to 43fbf16 Compare February 9, 2021 11:57
@deeTEEcee
Copy link

This is assuming the same schema for both dbs though right? What about 2 different schemas which is what this issue is asking.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants