`migration squash` eliminates SQL statements
Describe the bug I encountered a bug while attempting to squash migrations using `supabase migration squash. It appears that this operation inadvertently removed SQL statements that targeted the storage schema.
To Reproduce Steps to reproduce the behavior:
- Create two migrations and include the following example statement:
-- Create buckets
INSERT INTO STORAGE.buckets (id, name)
VALUES (
'documents',
'documents'
);
- Run
supabase migration squash - Check if the above statement is present in the resulting migration file.
Expected behavior I expected that executing supabase migration squash would not alter the outcome of the migration.
Desktop (please complete the following information):
- OS: macOS
- Version of CLI: 1.100.1
- Version of Node.js: 18.13.0
It also does not include cron jobs. Perhaps it would be nice to document somewhere in the CLI docs that some statements will be missing. It took us quite some time to figure this out.
Perhaps it would be nice to document somewhere in the CLI docs that some statements will be missing.
Good call. I will update the docs accordingly https://github.com/supabase/cli/pull/2412