Skip to content

tul1/STEELMAN

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STEELMAN

DB

STEELMAN database is managed with migrate. To create an update in the database like an addition, removal or edition of a table or a column in a table you must create a migration file running the following command:

$migrate create -ext sql -dir db/migrations -seq <migration>

After running the command, two files in db/migrations will be created, the up file with the extension up.sql and the down file with the extension down.sql. In the up file you must write the sql code to udpate the database and in the down file you must write the sql code to rollback the intended update.

Docker-compose will take care of the rest, you just have to run the migrate container to update the database.

Note: <migration> must have a representative name like create_user_table or remove_id_column_user_table

For more info about how to use migrate: https://github.com/golang-migrate/migrate/blob/master/database/postgres/TUTORIAL.md

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages