supabase-community / seed

Automatically seed your database with production-like dummy data based on your schema for local development and testing.
MIT License
489 stars 19 forks source link

Node items forms circular dependency #203

Open LordZardeck opened 2 weeks ago

LordZardeck commented 2 weeks ago

I have a table which can reference itself. For example, an item can have a source item linked to it so we can sync changes forward if the user desires. However, with the seed utility, i get the error AssertionError: Node items forms circular dependency: items -> items and am unable to proceed. Is this not a supported use case?

Example excerpt:

create table catalog.items
(
    id                   bigserial                              not null primary key,
    folder_id            bigserial                              references catalog.folders on delete set null,
    source_item_id       bigserial                              references catalog.items on delete set null,

    created_at           timestamp with time zone default now() not null,
    updated_at           timestamp with time zone default now() not null,
    title                text
);