Registry / database / grunt-sails-mysql-transit

grunt-sails-mysql-transit

JSON →
library0.1.9jsnpmunverified

Grunt task that automigrates changes from Sails.js models to a MySQL/MariaDB database. Version 0.1.9 is the latest stable release; the package has not been updated since 2016 and appears to be unmaintained. It uses sequelize ORM for database introspection but claims to work with Waterline. Differentiators: integrates directly into Grunt workflow, handles automatic table/field creation and alteration, respects interactive mode for safety. Note: there is a known limitation—cannot drop fields with constraints (manual removal of keys is required).

npm install grunt-sails-mysql-transit
INSTALL
IMPORT
SIG · GRUNT-SAILS-MYSQL-
G
grunt-sails-mysql-transit
databasejavascriptv0.1.9
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

grunt task
grunt.loadNpmTasks('grunt-sails-mysql-transit');
require('grunt-sails-mysql-transit')
The package is a Grunt plugin; you register it via loadNpmTasks, not direct require.

Configures and registers the grunt task, then runs migration with interactive mode and environment selection.

// Install npm install grunt-sails-mysql-transit --save-dev // In Gruntfile.js or tasks/config/migrate.js: module.exports = function(grunt) { grunt.config.set('smTransit', { mysql: true }); grunt.loadNpmTasks('grunt-sails-mysql-transit'); }; // In tasks/register/migrate.js: module.exports = function (grunt) { grunt.registerTask('migrate', [ 'smTransit' ]); }; // Run with optional params: grunt migrate --interactive=true --env=production
Debug
Known issues
deprecatedPackage is no longer maintained; may not work with modern Node.js versions.
fix
Consider using an alternative migration tool for Sails.js or sequelize directly.
affects: >=0.1.9
gotchaCannot remove fields with constraints (primary key, foreign key); must drop constraints manually first.
fix
Manually remove constraints on the field before running the migration.
affects: all
gotchaUses sequelize ORM under the hood; may behave differently with Waterline or custom adapter configurations.
fix
Test your models thoroughly after migration.
affects: all
Errors
Common errors & fixes
Warning: Task "smTransit" not found. Use --force to continue.
Grunt task not registered or loadNpmTasks not called.
fix
Ensure you have placed 'grunt.loadNpmTasks("grunt-sails-mysql-transit");' in your Grunt configuration.
Cannot find module 'mysql-transit'
Missing peer dependency mysql-transit.
fix
Run 'npm install mysql-transit' in your project.
Error: connect ECONNREFUSED
MySQL server is not running or connection config is wrong.
fix
Start MySQL service and verify your database connection settings in config/env/production.js (or appropriate file).
Upgrade
Version history
0.1.9latest on npm
Audit
Dependencies
mysql-transitrequiredcore migration logic
Agent activity
6 hits · last 30 days
node
6
Resources
grunt-sails-mysql-transit — npm install grunt-sails-mysql-transit · libregistry