Drizzle TeamDT
Drizzle Team•11mo ago
Jack

Complex seeding tasks

Heyo,

I am just transitioning to drizzle-seed, but I am struggling to replicate the power I had with my monolithic file of for loops. One example is we have a table called week_number_systems which holds things like ISO 8601, US Sunday etc. Then, we run a task to populate another table called week_definitions. The week definitions table has each row represent a week, and a week number system can have many week definitions (one to many). This is so that our app's schedule is dynamic, and can support any type of week.

The week definition has a starts_at and ends_at, as well as a year and week (because 1 day, can have have a different week number or year as per ISO 8601 or US Sunday).

I am thinking, with Drizzle seed (which is an amazing package by the way) is it possible to seed things like the week definition, where the week numbering system is ISO 8601, and as such each week starts on a monday? 😅
Was this page helpful?