mattermost / mattermost-plugin-msteams

MS Teams plugin for Mattermost
Other
13 stars 11 forks source link

Integrate morph into the plugin #619

Closed mgdelacroix closed 1 month ago

mgdelacroix commented 3 months ago

Summary

This PR integrates morph into the plugin store code, moving all migrations to SQL files, splitting them for improved clarity and structure. It creates a new msteamssync_system_settings table that stores one row per data migration, allowing them to indicate when they've run and removing the need for checking the database status every time the plugin starts to see if each data migration should run.

The Migrate method implements a sequence of migrations that ensures that at every step all the requirements of the next migration are met or checked (either by morph or the data migration through the previously mentioned table), and every step logs when the migration starts, stops and the elapsed time.

mgdelacroix commented 2 months ago

@lieut-data we could do one big "init" migration only, but there are two downsides that I can think of:

mgdelacroix commented 2 months ago

/update-branch