Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Migration Self Service System

Database Migration Self Service System using TypeORM, no server required!

Run locally, no need to deploy on a server.

📌 Table of Contents

📦 Installation

  1. Clone the repo
  2. Run pnpm i
  3. Run any of the migration command in package.json

⚙️ Setup

  1. Modify the .env file with your cred

🚨 Before Production Use

  1. Remove the Sample Migration File
  2. Running any command would create a new table called migrations which TypeOrm uses to keep track of migrations thats been ran. typeorm-generated-table

📖 List of pnpm commands

See a list of migration commands

Run pnpm migration pnpm-migration-screenshot

Create a new migration file

  1. Run pnpm migration:generate. pnpm-create-screenshot
  2. You can then edit that migration script.
  3. Add a up() function which is used to rollout the migration.
  4. Add a down() function which is used to rollback the migration.

Roll out all migration(s) that has not been executed

Run pnpm migration:up pnpm-up-screenshot

Roll back the latest migration

Run pnpm migration:down pnpm-down-screenshot

📜 Support

If you like this project and want to support it, you can buy me a coffee:

Buy Me a Coffee

PayPal

About

Database Migration System using TypeORM, no server required!

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages