Skip to content

Kurisu3/db-scripts

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DB Scripts

Contains shell scripts for starting, stopping, and restarting a Postgres database that has been installed via asdf and whose data directory is stored in a priv/postgres subdirectory of the current working directory.

I often have multiple projects on my computer that require different versions of Postgres. Asdf allows me to easily have mutliple versions of Postgres installed, and storing the database's files in each project directory allows me to use versions of Postgres whose data formats are incompatible. Storing the database's files in each project directory also allows me to delete the entire DB without impacting other projects.

Another solution would be to use Docker, but I find that Docker adds complexity and slows down development enough that I don't want to use it on simpler projects.

Usage

db-start: starts a Postgres database, or fails with a (hopefully) helpful error message.

db-stop: stops any running Postgres database.

db-restart: stops and then starts a Postgres database.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Shell 100.0%