move migrations to be optional

This commit is contained in:
2024-10-16 17:50:02 -06:00
parent 72df3adf0d
commit 4ab30365a6
5 changed files with 40 additions and 38 deletions

View File

@ -17,9 +17,9 @@ func main() {
// Open the database
tdb, err := libsqldb.NewLibSqlDB(
primaryUrl,
migrationFiles,
libsqldb.WithMigrationFiles(migrationFiles),
libsqldb.WithAuthToken(authToken),
libsqldb.WithLocalDBName("local.db"),
libsqldb.WithLocalDBName("local.db"), // will not be used for remote-only
)
if err != nil {
fmt.Fprintf(os.Stderr, "failed to open db %s: %s", primaryUrl, err)