-
Notifications
You must be signed in to change notification settings - Fork 3
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
better file/folder organization for DB scripts across all NApps #61
Comments
Here's naming convention for folders and scripts to easily identify which version, and sequence, and how to use:
Here's an example of how
Let me know if you have any other suggestions to consider, otherwise we'll go with this one |
We should also consider including DB version information somewhere in the DB. It could be as simple as a collection, with entries containing the name of a collection, and the version id of that collection. We can then use that information during migrations to validate the migration. |
That's a good idea, @Ktmi. We could reserve a class MigrationDoc(BaseModel):
napp_id: str
id: str # unique mapped to underlying Mongo doc _id
collection: str
inserted_at: datetime
updated_at: datetime Where Another benefit of keeping track of the id is that it also facilitate scripts to be idempotent by simply querying first if the |
We'll move forward with the proposed approach. |
The ideia with the
So, if an user is trying to execute a new |
Currently these NApps have the following scripts:
On each NApp scripts README.md we have further information about each script, which is great to understand when to use. But it's becoming difficult to link this on release notes and trying to understand on which version upgrade the script is needed for. Also, the ordering of the script isn't immediately clear, on
mef_eline
we started to use a 3-digit as a prefix which helped out, but this pattern is only be used onmef_eline
so far.This issue is to discuss a proposal for it, and then sticky with a new pattern, it needs to solve the following problems:
The text was updated successfully, but these errors were encountered: