CREATE TABLE IF NOT EXISTS "tenant_members" ("id" varchar PRIMARY KEY NOT NULL, "user_id" varchar NOT NULL, "tenant_id" varchar NOT NULL, "role" varchar CHECK( "role" IN ('SUPER_ADMIN','TENANT_ADMIN','USER') ) NOT NULL DEFAULT ('USER'), "created_at" datetime NOT NULL DEFAULT (datetime('now')), "updated_at" datetime NOT NULL DEFAULT (datetime('now')), CONSTRAINT "FK_396d571d91da471867fcfbdd2e4" FOREIGN KEY ("user_id") REFERENCES "users" ("id") ON DELETE CASCADE ON UPDATE NO ACTION, CONSTRAINT "FK_ffba0c9ecd4fd98550b3300ae68" FOREIGN KEY ("tenant_id") REFERENCES "tenants" ("id") ON DELETE CASCADE ON UPDATE NO ACTION);
