Update D1 schema on build of Pages project?

I want my Pages project deployments to automatically update the attached schema (creating tables, etc.) when the project is updated/built. How should I do that?
My current alternative to automate this is just to prepend 'create table if not exists' in all of my worker functions, but I'd prefer to do it at or immediately after build time.
Was this page helpful?