Skip to content

migration squash eliminates SQL statements #1618

Open
@zeekrey

Description

@zeekrey

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:

  1. Create two migrations and include the following example statement:
-- Create buckets
INSERT INTO STORAGE.buckets (id, name)
VALUES (
    'documents',
    'documents'
  );
  1. Run supabase migration squash
  2. 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions