Notely uses drizzle to manage database migrations, that is, the process of updating the database schema so that the server can function properly. Drizzle has already been added as a dependency and the initial schema files have been created. So we can focus purely on running migrations through CD.
If you're interested in how this was configured you can check out drizzle's getting started docs.
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
npm run db:migrate
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!
Become a member to Complete