Registry / database / grunt-flyway

grunt-flyway

JSON →
library0.3.2jsnpmunverified

Grunt plugin to run Flyway database migration tasks (clean, baseline, migrate, repair, validate, info) directly from Gruntfiles. Latest version 0.3.2 uses Flyway 3.2 and requires Grunt >=0.4.2 and Java runtime. Notably, this plugin is explicitly marked as not thoroughly tested and uses an outdated Flyway version. It supports all core Flyway command-line options but is deprecated in favor of direct Flyway CLI usage or modern build tool integrations.

npm install grunt-flyway
INSTALL
IMPORT
SIG · GRUNT-FLYWAY
G
grunt-flyway
databasejavascriptv0.3.2
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.

flyway
grunt.loadNpmTasks('grunt-flyway'); grunt.initConfig({ flyway: { ... } });
var flyway = require('grunt-flyway');
This is a Grunt plugin; it must be loaded via grunt.loadNpmTasks and configured in grunt.initConfig. Direct require() will not function.

Loads grunt-flyway plugin, configures a migrate task with MySQL driver and connection details from environment variables.

// Gruntfile.js module.exports = function(grunt) { grunt.loadNpmTasks('grunt-flyway'); grunt.initConfig({ flyway: { options: { driver: 'com.mysql.jdbc.Driver', url: 'jdbc:mysql://localhost:3306/mydb', user: process.env.DB_USER || 'flyway', password: process.env.DB_PASS || 'flyway' }, migrate: { command: 'migrate' } } }); grunt.registerTask('default', ['flyway']); };
Debug
Known issues
deprecatedFlyway version 3.2 is extremely outdated; many security vulnerabilities and missing features in modern Flyway.
fix
Use Flyway CLI directly or a modern build tool plugin (e.g., flyway-maven-plugin, flyway-gradle-plugin).
affects: >=0.0.0
gotchaPlugin explicitly marked as not thoroughly tested; may produce unexpected results.
fix
Test thoroughly in non-production environments before use.
affects: >=0.0.0
gotchaJava must be installed and 'java' executable available in PATH; plugin does not check or bundle it.
fix
Install Java and ensure java is in PATH.
affects: >=0.0.0
gotchaOptions may be out of sync with Flyway documentation; plugin docs may not reflect all Flyway features.
fix
Cross-reference with official Flyway command-line documentation.
affects: >=0.0.0
Errors
Common errors & fixes
Warning: Task "flyway" not found.
Plugin not loaded via grunt.loadNpmTasks('grunt-flyway')
fix
Ensure you have added 'grunt.loadNpmTasks('grunt-flyway');' in your Gruntfile before configuring the task.
Error: Cannot find module 'grunt-flyway'
grunt-flyway not installed or missing from node_modules
fix
Run 'npm install grunt-flyway --save-dev' in your project directory.
Fatal error: Unable to locate 'java' executable
Java runtime not installed or not in PATH
fix
Install Java (JRE or JDK) and add its bin directory to your system PATH.
Upgrade
Version history
0.3.2latest on npm
Audit
Dependencies
gruntoptionalRequired peer dependency to load the Grunt task
Agent activity
6 hits · last 30 days
node
6
Resources
grunt-flyway — npm install grunt-flyway · libregistry