3 ms·
Nope. Just have a directory: ./sql/0001_create_users.sql ./sql/0002_create_sessions.sql .... Each query for modifying the schema is idempotent and
by r3trohack3r 4y ago
Nope. Just have a directory:
./sql/0001_create_users.sql
./sql/0002_create_sessions.sql
....
Each query for modifying the schema is idempotent and safe to be rerun.
Then I do:
ls ./sql | xargs -I{} wrangler d1 execute <db> --file {}
Can put that in a script to make things easy. You use the same script to modify the db as you do to bootstrap a db from scratch.