21 lines
391 B
Markdown
21 lines
391 B
Markdown
# sqliteutil
|
|
|
|
## Transactions
|
|
|
|
Simplify transactions using `WithTx`.
|
|
|
|
## Migrations
|
|
|
|
Put your migrations into a directory, for example `migrations`, ordered by name
|
|
(YYYY-MM-DD prefix, for example). Embed the directory and pass it to the
|
|
`Migrate` function:
|
|
|
|
```Go
|
|
//go:embed migrations
|
|
var migrations embed.FS
|
|
|
|
func init() {
|
|
Migrate(db, migrations) // Check the error, of course.
|
|
}
|
|
```
|