jab

Crates.iojab
lib.rsjab
version0.0.1
sourcesrc
created_at2020-03-19 18:05:16.769329
updated_at2020-03-19 18:05:16.769329
descriptionJAB is a database state management tool, think of it as git but for database. You can commit your current db state and checkout to your previous db state.
homepagehttps://github.com/sendyhalim/jab
repositoryhttps://github.com/sendyhalim/jab
max_upload_size
id220526
size74,882
Sendy Halim (sendyhalim)

documentation

README

Jab

jab is a database state management tool, think of it as git but for database. You can commit your current db state and checkout to your previous db state.

Crates.io Crates.io

📠 Notes

  • Currently only supports postgres.
  • This project only works if you have ON DELETE CASCADE on every FK constraints otherwise we can't do clean restore (hopefully this will change in the future).

🔩 Installation

Manual (requires rust)

git clone git@github.com:sendyhalim/jab.git

make install

Download

Dynamically linked binaries are only available for macos and linux. Go here.

🎮 Usage

# First create project.
# Currently only supports postgres.
# ------------------------------------------
jab project create awesomestuff --database-uri="username:password@localhost:5433"

# Start commiting your db
# ------------------------------------------
jab project commit awesomestuff --message "my first commit"

# See log
# ------------------------------------------
jab project log awesomestuff

# Restore your db to the latest commit
# ------------------------------------------
jab project restore awesomestuff

# Restore your db to a specific commit
# ------------------------------------------
jab project restore awesomestuff [optional-hash]


# List of available projects
# ------------------------------------------
jab project list
Commit count: 59

cargo fmt