Given the following tables
CREATE TABLE users (
id SERIAL PRIMARY KEY,
name TEXT NOT NULL,
email TEXT NOT NULL,
organization_id TEXT NOT NULL,
UNIQUE (name, email)
);
CREATE TABLE tasks (
id SERIAL PRIMARY KEY,
users_id TEXT NOT NULL,
organization_id TEXT NOT NULL,
description TEXT NOT NULL
);
Is it possible to create constraints for 'user_id' column , that i can use values form 'users' table only with the same organization_id?