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 🙏

© 2025 – Pkg Stats / Ryan Hefner

jmig

v0.0.3

Published

database agnostic migrations manager

Downloads

14

Readme

jmig 0.0.2 by tux

jmig is a simple mysql and postgres migrations manager

installation

# install globally
npm i -g jmig

# install into your project
npm i --save jmig

configuration

configuration can be done with jmig init to generate a config.json. alternatively, jmig can read from your environment for relevant details. those environment variables are as follows:

JMIG_DRIVER
JMIG_HOST
JMIG_PORT
JMIG_USERNAME
JMIG_PASSWORD
JMIG_DB

this option is very useful when config consolidation is important or configuration is done with .env files, docker environment, or docker compose files.

please note that config.json won't be combined with your environment. if config.json exists, jmig will use that first, other it will fall back to environment variables.

jmig commands

initialize jmig

jmig init

this will ask you a few questions and create a config.json file in the current directory as long as one doesn't already exist. if one already exists, jmig will say so and the program will exit.

options

-f force init and overwrite config.json if it exists

generated json

{
  "host": "localhost",
  "port": 3306,
  "username": "root",
  "password": "root",
  "db": "mydb",
  "driver": "mysql"
}

your data will vary according to what you've put in either manually or via jmig init.

create a new migration

jmig create [name]

this will create a new file in the format of [timestamp]-[name].sql in the migrations folder. the name can be a single word, multiple words, or whatever you'd like. each space is replaced with a dash. for instance, jmig create my new migration will result in a migration named [timestamp]-my-new-migration.sql. it will contain an up: and down: label. there must be a newline after each label and a newline after each command you write. if you don't have an up or a down, you can leave the label out of the migration, or leave it blank; either way is fine.

check the status of each migration

jmig status

this will check each migration in the migrations folder and compare that against what is in the jmig table that jmig will create in the beginning. migrations that are present in the table will be marked as up and migrations that are not will be marked as dn. a count of pending migrations will be shown.

apply all pending migrations

jmig migrate

this will run each migration marked as dn from jmig status and execute the contents from the up: label located in that migration. if multiple migrations are marked as dn, they will be ran sequentially starting with the oldest.

rolling back migrations

jmig rollback

this will rollback each migration marked as up from jmig status and execute the contents from the down: label located in that migration. by default, only the most recently migration will be rolled back.

license

jmig is available under the MIT License