CREATE TABLE asset_stacks (
    stack_id         UUID PRIMARY KEY,
    stack_type       TEXT NOT NULL,
    primary_asset_id UUID NOT NULL REFERENCES assets(asset_id),
    owner_user_id    UUID NOT NULL,
    members          JSONB NOT NULL DEFAULT '[]'
);

CREATE INDEX idx_stacks_owner ON asset_stacks(owner_user_id);
