npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

grunt-sails-mysql-transit

v0.1.9

Published

Grunt task for Sails Mysql migration tool

Downloads

24

Readme

grunt-sails-mysql-transit

Grunt task for Sails MySQL migration tool. With this task you'll be able to automigrate changes from your models to your existing mysql/mariadb database. It's developed and tested with sequelize ORM, but it should work with Waterline as well. For other frameworks/implementations please use the core package mysql-transit.

Known issues

For now if there is any constraint on a certain field you'll not be able to remove the field in question using this tool. You have to remove the constraint(primary key / foreign key) manually, and then you can run the tool again and remove the field. If there is any other issue please report it using the issues tab in this repository or by email to [email protected] and we'll do our best to publish a new version.

Install

npm install grunt-sails-mysql-transit

Config

Create migrate.js in tasks/config

module.exports = function(grunt) {

  grunt.config.set('smTransit', {
    mysql: true
  });
  grunt.loadNpmTasks('grunt-sails-mysql-transit');
};

and create migrate.js in tasks/register

module.exports = function (grunt) {
  grunt.registerTask('migrate', [
    'smTransit'
  ]);
};

Usage

grunt migrate [--interactive=true --env=NODE_ENV]

Optional params

There are 2 optional parameters - interactive (deafault is true) and env (default is the enviroment variable NODE_ENV). If you set the interactive param to false, it will perform all the operations except deleting tables and fields. This is useful if you want to include the task in a deployment script, but you'll have to take care about the garbage yourself. The other param is the env, if you want to specify the environment on which you want to apply the changes. This means that you have custom config file for e.g. config/env/production.js where the production mysql connection params are stored.