Handling migration #388
-
|
I was wondering how you guys tackle migrations within ThingsDB. Like creating/updating types, procedures, or enums. Been struggling a bit with getting a structured way of handling this. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Let me describe our workflow but keep in mind that this might be improved, and we're open to ideas for tools which might help improve the workflow. We use a "dump" of all the types, enum's and procedures in *.ti files in a single location (a single file might also work). For changes we create a sub branch, for example In the In our IDE's, we usually exclude the Another approach might be to work with migration files only, but the downside is that it might be hard to find the current state as this might be spread across different files and therefore would require to look in ThingsDB for the actual definitions etc. |
Beta Was this translation helpful? Give feedback.
Let me describe our workflow but keep in mind that this might be improved, and we're open to ideas for tools which might help improve the workflow.
We use a "dump" of all the types, enum's and procedures in *.ti files in a single location (a single file might also work). For changes we create a sub branch, for example
issue001and when we need changes we apply them both to the corresponding ti file, and just before we merge the branch we create a correspondingissue001.timigration file in amigrationfolder.In the
issue001.tiwe define the migration code which can be a new procedure, but also a change to a procedure (mod_procedure) or a change to an enumerator or type.In our IDE's, we …