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

Add support for entire database namespaces #2

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

aldaliu
Copy link

@aldaliu aldaliu commented Jul 19, 2023

For our usecase, we are doing migrations of entire DBs and would like to provide a DB name as a namespace and have the migration-verifier check all collections of the DB.

Here are the high level changes:

  • Extracted a function to find all namespaces for a database from ListAllUserCollections in list_namespaces.go
  • I've added some logic to the parsing of the --srcNamespace flag to detect database names in check.go
    • for each database found, use the new function to get all the collections in that DB and append it to the slice of srcNamespace
  • added some util functions to help parse namespaces for DB names

This commit changes namespace parsing to support databases.
First we check if any namespaces contain only the database name,
then we fetch all collections from that database and append it to
the namespace slice.
@sibelius
Copy link

any progress on this ?

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