import (
"embed"
embedmigrations "github.com/Delisa-sama/go-embed-migration-source"
)
//go:embed migrations
var migrationFiles embed.FS
// MigrationSource embedded migration source.
var MigrationSource = &embedmigrations.EmbedFileSystemMigrationSource{
FileSystem: migrationFiles,
Dir: "migrations",
}
...
num, err := sqlmigrate.ExecMax(
db,
dialect,
MigrationSource,
sqlmigrate.Up,
limit,
)
if err != nil {
return err
}
-
Notifications
You must be signed in to change notification settings - Fork 0
Delisa-sama/go-embed-migration-source
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
No description or website provided.
Topics
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published