/*
  Warnings:

  - A unique constraint covering the columns `[companyId,code]` on the table `PurchaseOrder` will be added. If there are existing duplicate values, this will fail.
  - Added the required column `code` to the `PurchaseOrder` table without a default value. This is not possible if the table is not empty.

*/
-- AlterTable
ALTER TABLE "obm_core"."PurchaseOrder" ADD COLUMN     "code" TEXT NOT NULL;

-- AlterTable
ALTER TABLE "obm_core"."PurchaseOrderItem" ALTER COLUMN "productName" DROP NOT NULL;

-- CreateIndex
CREATE UNIQUE INDEX "PurchaseOrder_companyId_code_key" ON "obm_core"."PurchaseOrder"("companyId", "code");
