We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Migrations

Notely uses goose to manage database migrations, that is, the process of updating the database schema so that the server can function properly.

Assignment

go install github.com/pressly/goose/v3/cmd/goose@latest
goose -version # should be at least v3.18.0
libsql://notely-db-YOURNAME.turso.io

The final connection configuration line will look something like this:

DATABASE_URL=libsql://notely-db-YOURNAME.turso.io

Don't forget to add your .env file to your .gitignore

turso db tokens create notely-db
DATABASE_URL=libsql://notely-db-YOURNAME.turso.io?authToken=YOURTOKENHERE
./scripts/migrateup.sh
turso db shell notely-db
PRAGMA table_info(users);
PRAGMA table_info(notes);

If everything looks good, you're ready to move on to the next lesson!