Manage your databases easier than ever by versionning yours sql files With alter you can create new sql version file with your database updates and apply them with one command.
npm install -g alter
alter init # Init your alter projet
alter version # Create new database version file
alter status # See status of all versions
alter apply # Apply all non commited version to your database
First, init your alter projet:
alter init
This will create:
- db folder to store differents sql version
- alterResolver to exports database credentials. Add it to your .gitignore file !
- alter.json to save differents alter configurations
- The first version of sql statements
- db_folder: The path of the folder which contain sql versions
- resolver: The path of the credentials resolver script
- system: The sgbd identifier. Only 'postgres' for the moment
Like .gitignore, but for alterJs
Christophe Sonneville