-
-
Notifications
You must be signed in to change notification settings - Fork 127
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
Migrations attempt to run Vim swap files #743
Labels
Comments
This is my fix:
However, it seems I should log this issue in the |
I have created a pull request in the |
It might also be best to only run migration filenames that end in |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
Vim creates swapfiles when editing a file. They take the filename format
.filename.swp
.If migrations are run with swapfiles present, the migrations attempt to execute them, causing an error:
In the above example,
python craft migrate
attempts to run the migration file.2023_01_31_175104_create_accounts_table.swp
, which the expected behaviour is that it should be ignored.This could be fixed for Vim (and also any other text editor that does the same) by ignoring any migration file that begins with a dot (
.
) at the beginning of the filename. This is generally accepted convention to ignore such files in most cases.Expected behaviour
Ignore all migration files that begin with a dot (
.
.)Steps to reproduce the bug
Create the migration:
Open the migration file in Vim.
Run the migration with Vim still open in the background:
Screenshots
No response
OS
Linux
OS version
Ubuntu 22.04.1 LTS (5.15.0-58-generic x86_64 GNU/Linux)
Browser
No response
Masonite Version
4.17.4
Anything else ?
No response
The text was updated successfully, but these errors were encountered: