-
Notifications
You must be signed in to change notification settings - Fork 231
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sql/sqltool: wrap flyway dir with fs #1642
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, @masseelch wdyt?
Co-authored-by: Ariel Mashraki <7413593+a8m@users.noreply.github.com>
sql/sqltool/tool.go
Outdated
// FlywayDir wraps migrate.LocalDir and provides a migrate.Scanner implementation able to understand files | ||
// generated by the FlywayFormatter for migration directory replaying. | ||
FlywayDir struct{ *migrate.LocalDir } | ||
FlywayDir struct{ fs.FS } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit comment as well
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Like the idea. However, I suggest to wrap migrate.Dir
instead of fs.FS
.
Because |
Co-authored-by: Jannik Clausen <12862103+masseelch@users.noreply.github.com>
Extending FlywayDir Functionality with fs.FS
By wrapping
FlywayDir
withfs.FS
, we can extend its functionality to include local directories and directories in memory or remote directories.