-
Notifications
You must be signed in to change notification settings - Fork 1
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
Write apps to mongo #32
Conversation
|
) | ||
|
||
type GatewayAAT struct { |
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.
Long-term, all the models need to be updated to use portal-api-go repository package IMO.
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.
yeah but for this case the point is to migrate to the mongo equivalent which is not the same
return 0, 0, err | ||
} | ||
|
||
appsToWrite := convertRepositoryToMongo(getItemsNotInMongo(postgresApps, mongoApps), models.RepositoryToModelApp) |
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 think we need to compare the two lists to only add entries that are needed to Mongo (unless the intention is to consistently UPDATE and keep in exact sync with Postgres DB?
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.
yeah this only adds new entries once, that results an empty slice in case there is none
Adds a new lambda:
migrate-to-mongo
whose job is to perform routine migrations of apps/lbs created in the postgres database to the mongo database for data integrity while the migration is being performed