

0 / 2 embers
0 / 3000 xp
click for more info
Complete a lesson to start your streak
click for more info
Still calibrating
click for more info
Not enough gems
Cost: 6 gems
1: Turso
incomplete
2: Migrations
incomplete
3: Migrate Automatically
incomplete
4: Using the DB
incomplete
5: CI/CD Review
incomplete
This lesson's interactive features are locked, please to keep using them
Notely uses goose to manage database migrations, that is, the process of updating the database schema so that the server can function properly.
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!