Table "commerce.pin_identities" Column | Type | Collation | Nullable | Default --------------+--------------------------+-----------+----------+------------------- id | uuid | | not null | gen_random_uuid() tenant_id | uuid | | not null | product_code | character varying(50) | | not null | shop_id | uuid | | | name | character varying(100) | | not null | pin_hash | character varying(255) | | not null | is_active | boolean | | not null | true created_at | timestamp with time zone | | not null | CURRENT_TIMESTAMP created_by | uuid | | | Indexes: "pin_identities_pkey" PRIMARY KEY, btree (id) "pin_identities_shop_idx" btree (shop_id) "pin_identities_tenant_id_product_code_name_unique" UNIQUE CONSTRAINT, btree (tenant_id, product_code, name) "pin_identities_tenant_product_active_idx" btree (tenant_id, product_code, is_active) Foreign-key constraints: "pin_identities_created_by_foreign" FOREIGN KEY (created_by) REFERENCES tenant_users(id) ON DELETE SET NULL "pin_identities_product_code_foreign" FOREIGN KEY (product_code) REFERENCES nix_products(code) "pin_identities_shop_id_foreign" FOREIGN KEY (shop_id) REFERENCES commerce.shops(id) ON DELETE CASCADE "pin_identities_tenant_id_foreign" FOREIGN KEY (tenant_id) REFERENCES tenants(id) ON DELETE CASCADE