Closed WorldsEndless closed 5 years ago
The init script is meant to be run once for any specific schema initialization that's not part of the actual migrations. The reason it needs to be in a separate file is due to the fact that regular migration checks can't be done before the migrations table is created. There's more info in the implementation here if you're interested to see what's happening. You should be using the init script to run the actual migrations.
Since it is the same issue as 93, I'm going to close this one.
Fair enough. I opened a seperate issue for documentation purposes, since the other issue explicitly mentioned MySQL and this was SQLite.
Ah ok, I'll update the title for the other issue.
Essentially the same issue as #93. SQLite init file with:
Only executes the DROP line. No errors are thrown, no further information; it simply ignores the rest. Presence of --;; doesn't effect the results.
However, in a normal migration (outside init.sql), this works fine if you have --;; between commands.
Side question: why is init.sql handled differently than others, and what is it for, if not for creating (initializing) your tables? I note that it works great in postgres.