-- DropForeignKey
ALTER TABLE `issued_orders` DROP FOREIGN KEY `issued_orders_ibfk_1`;

-- DropIndex
DROP INDEX `issued_orders_customer_id` ON `issued_orders`;

-- AlterTable
ALTER TABLE `issued_orders` DROP COLUMN `customer_id`,
    ADD COLUMN `supplier_id` INTEGER NULL;

-- CreateIndex
CREATE INDEX `issued_orders_supplier_id` ON `issued_orders`(`supplier_id`);

-- AddForeignKey
ALTER TABLE `issued_orders` ADD CONSTRAINT `issued_orders_supplier_fk` FOREIGN KEY (`supplier_id`) REFERENCES `sklad_suppliers`(`id`) ON DELETE RESTRICT ON UPDATE NO ACTION;

