-
Notifications
You must be signed in to change notification settings - Fork 623
Open
Labels
Description
When creating a migration file, goose adds a prefix in timestamp format with precision to the second. If you run the goose create command twice in a second, you will get unexpected behavior:
➜ goose create test
2024/02/29 16:39:34 Created new file: 20240229133934_test.go
➜ goose create test
2024/02/29 16:39:34 goose run: failed to create migration file: %!w(<nil>)
Error in the line https://github.com/pressly/goose/blob/master/create.go#L61
To be honest with the user, I think it is necessary to return an error indicating that such a file already exists.