sisu-network / deyes

1 stars 1 forks source link

Use go:embed to embed migrations #10

Closed mark-rushakoff closed 2 years ago

mark-rushakoff commented 2 years ago

The application should not assume that the migrations exist on disk.

We can use go:embed to embed the migration files into the binary. I am not sure whether golang-migrate can support reading the strings from memory, but if not, we can write the files to a temporary directory.

mark-rushakoff commented 2 years ago

I found out later that deyes doesn't actually have any migrations yet, so closing this.

(It does expect a migrations directory, but it accepts an empty directory.)