migrations/ directory, run with sql-migrate. Since they are embedded into your binary, a deployed application carries its own schema history.
Writing Migrations
Migration files are named sequentially with a short description, such as0001_initial.sql and 0002_create_rockets.sql. Each file has an up and a down section:
migrations/0002_create_rockets.sql
Running Migrations
During development, you rarely need to think about migrations sincecopper run applies any pending ones before starting your application. If you would like to skip this, pass -migrate=false.
You may also run migrations on their own:
Migrations in Production
copper build compiles a standalone migrator alongside your app:
-set:
[csql.migrations] keys are listed in the Configuration Reference.