Periodically re-importing D1 database and Maintenance mode
I have a read-only REST API serving (semi) static data.
Each month the data changes and we basically get a full name database; there is no diff or whatsoever available.
So my idea was to drop the existing D1 tables, and run the import script.
And in the meantime return a maintenance response.
Could I use a Environment variable MAINTENACE_MODE for this, and when flipping will Cloudflare workers pick it up directly?
Or is there a better way to implement this scenario?
Each month the data changes and we basically get a full name database; there is no diff or whatsoever available.
So my idea was to drop the existing D1 tables, and run the import script.
And in the meantime return a maintenance response.
Could I use a Environment variable MAINTENACE_MODE for this, and when flipping will Cloudflare workers pick it up directly?
Or is there a better way to implement this scenario?