Skip to content

Commit

Permalink
chore: add dbmate to the contrib guide (#2289)
Browse files Browse the repository at this point in the history
  • Loading branch information
deniseli authored Aug 7, 2024
1 parent 4f39234 commit c417145
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,15 @@ If you make any changes to the `sqlc` inputs, i.e. all the `sql/queries.sql` fil
just build-sqlc
```

We use [dbmate](https://github.com/amacneil/dbmate) to manage migrations. To create a migration file, run `dbmate new` with the name of your migration. Example:
```
dbmate new create_users_table
```

This will automatically create a migration file in `backend/controller/sql/schema/`. You can refer to any of the existing files in there as examples while writing your own migration.

[This section](https://github.com/amacneil/dbmate?tab=readme-ov-file#creating-migrations) of the dbmate docs explains how to create a migration if you'd like to learn more.

## VSCode extension

The preferred way to develop the FTL VSCode extension is to open a VSCode instance in the `extensions/vscode` directory. This will load the extension in a new VSCode window. From there, the `launch.json` and `tasks.json` files are configured to run the extension in a new window.
Expand Down

0 comments on commit c417145

Please sign in to comment.