You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I encountered an issue after pulling the committed SQL migration files from the repository. My friend pushed all of the SQL files, and when I tried to run the server using PostGraphile, the following error occurred during migration: Error: Invalid migration './migrations/committed/000001.sql': there should be two newlines after the headers section
Steps to Reproduce:
Clone the repository.
Pull the latest changes.
Run the following commands:
npm start
npm run migrate migrate
What I Tried:
Attempted to fix the issue by following the error message and adding some blank spaces in the migration file.
Even after these changes, the error persists.
Question:
How can I resolve this error with the migration file? Is there a specific way the SQL files should be structured that I am missing? Any guidance would be appreciated!
The text was updated successfully, but these errors were encountered:
I've improved the error message in #226 to give you some solutions to the issue of git converting the line endings in your files:
thrownewError(`Invalid migration '${fullPath}': it looks like the line endings have been corrupted - perhaps you have configured git to replace LF with CRLF? Here's a couple potential solutions:Option 1: Add \`path/to/migrations/committed/*.sql -text\` to \`.gitattributes\` in your repositoryOption 2: Globally reconfigure git to convert CRLF to LF on commit, but never convert LF back to CRLF: \`git config --global core.autocrlf input\``,);
I encountered an issue after pulling the committed SQL migration files from the repository. My friend pushed all of the SQL files, and when I tried to run the server using PostGraphile, the following error occurred during migration:
Error: Invalid migration './migrations/committed/000001.sql': there should be two newlines after the headers section
Steps to Reproduce:
npm start
npm run migrate migrate
What I Tried:
Question:
How can I resolve this error with the migration file? Is there a specific way the SQL files should be structured that I am missing? Any guidance would be appreciated!
The text was updated successfully, but these errors were encountered: