CREATE TABLE user_workspaces (
 user_id BIGINT NOT NULL,
 workspace_id BIGINT NOT NULL,
 PRIMARY KEY (user_id, workspace_id),
 CONSTRAINT fk_user_workspaces_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
 CONSTRAINT fk_user_workspaces_workspace FOREIGN KEY (workspace_id) REFERENCES workspaces(id) ON DELETE CASCADE
);
CREATE TABLE user_pads (
 user_id BIGINT NOT NULL,
 pad_id BIGINT NOT NULL,
 PRIMARY KEY (user_id, pad_id),
 CONSTRAINT fk_user_pads_user FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE,
 CONSTRAINT fk_user_pads_pad FOREIGN KEY (pad_id) REFERENCES pads(id) ON DELETE CASCADE
);
