I'm removing the product_id from product option as our product will define the option for each category instead of by product. So we remove product_id and add category_id instead
For ex:
Clothing category will always have Size, Color...
Electronics > Phone: Screen Size, Storage...
But after removing and adding the category_id, I can't add product anymore because something is querying for product_id which is removed.
query: 'SELECT "ProductOption"."id" AS "ProductOption_id", "ProductOption"."created_at" AS "ProductOption_created_at", "ProductOption"."updated_at" AS "ProductOption_updated_at", "ProductOption"."deleted_at" AS "ProductOption_deleted_at", "ProductOption"."title" AS "ProductOption_title", "ProductOption"."product_id" AS "ProductOption_product_id", "ProductOption"."metadata" AS "ProductOption_metadata" FROM "product_option" "ProductOption" WHERE ( "ProductOption"."product_id" IN ($1) ) AND ( "ProductOption"."deleted_at" IS NULL )',
parameters: [ 'prod_01H1T1EESJCTA270ZFJ20FSXK1' ],
driverError: error: column ProductOption.product_id does not exist