Support alternate database backend drivers#133
Merged
runleveldev merged 3 commits intomainfrom Nov 24, 2025
Merged
Conversation
mie-jcrandal
approved these changes
Nov 21, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces multi-database support and refactors migration scripts for improved safety and maintainability. The configuration now supports MySQL, PostgreSQL, and SQLite, with environment-driven selection. Several migrations have been updated to use Sequelize's safer bulk operations and proper identifier quoting, reducing the risk of SQL injection and improving compatibility across dialects. Additionally, the
sequelizeinitialization and dependencies have been updated to align with the new database support.Database Configuration and Initialization
config.jsfile now supports MySQL, PostgreSQL, and SQLite, selecting the dialect and relevant settings based on environment variables. Throws an error for unsupported dialects. (create-a-container/config/config.js)models/index.jsis now initialized directly from the config object, simplifying code and supporting the new config structure. (create-a-container/models/index.js)Migration Safety and Compatibility
bulkUpdateand identifier quoting instead of raw SQL queries, reducing SQL injection risk and improving compatibility. This affects node assignment logic and updates inadd-node-field-to-containers.js,convert-container-node-to-node-id.js, and related migrations. [1] [2] [3]create-node.jsnow selects distinct node names and usesbulkInsertfor safer and more portable data insertion. (create-a-container/migrations/20251104193601-create-node.js)Dependency Updates
pgandsqlite3to dependencies inpackage.jsonto support PostgreSQL and SQLite. (create-a-container/package.json)