To create a migration, you only need two commands:
- supabase migration new <migration_name>
- supabase migration up --db-url <database_connection_string>
<database_connection_string - for local development this is usual 'postgresql://postgres:postgres@127.0.0.1:54322/postgres'
Then you put an SQL script inside it and that's it, the migration is ready :)
Prerequisites:
You need to have the Supabase CLI installed and run it from within a local Supabase project.