spin icon indicating copy to clipboard operation
spin copied to clipboard

Allow sqlite migrations for non-default databases.

Open rylev opened this issue 1 year ago • 3 comments

Fixes #2607

The database will be selected by the name of the migration file. This makes the name of the migration file significant, whereas previously it was not. If the name of the file and a known database don't line up, spin up will fail with an error message.

rylev avatar Jul 01 '24 15:07 rylev

@itowlson thanks for raising these concerns. I personally don't have strong feeling about what the right UX is here. I'd just want to ensure that it's easy to tell when the user is passing a file vs when they're passing raw SQL (since we support both). Right now the @ is used to disambiguate so perhaps we should keep the leading @. Perhaps a : between file name and databasename (i.e., @file.sql:database-name)?

rylev avatar Jul 02 '24 12:07 rylev

@file.sql:database-name works for me. Thanks!

itowlson avatar Jul 02 '24 18:07 itowlson

@itowlson ok done!

rylev avatar Jul 03 '24 13:07 rylev