mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
28 lines
550 B
Go
28 lines
550 B
Go
package migrations
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/fnproject/fn/api/datastore/sql/migratex"
|
|
"github.com/jmoiron/sqlx"
|
|
)
|
|
|
|
func up8(ctx context.Context, tx *sqlx.Tx) error {
|
|
_, err := tx.ExecContext(ctx, "ALTER TABLE apps ADD annotations TEXT;")
|
|
|
|
return err
|
|
}
|
|
|
|
func down8(ctx context.Context, tx *sqlx.Tx) error {
|
|
_, err := tx.ExecContext(ctx, "ALTER TABLE apps DROP COLUMN annotations;")
|
|
return err
|
|
}
|
|
|
|
func init() {
|
|
Migrations = append(Migrations, &migratex.MigFields{
|
|
VersionFunc: vfunc(8),
|
|
UpFunc: up8,
|
|
DownFunc: down8,
|
|
})
|
|
}
|