added vendors table

This commit is contained in:
2026-01-27 12:23:59 -05:00
parent ecd7182153
commit 3aa9b6f325
20 changed files with 1058 additions and 5 deletions

View File

@@ -0,0 +1,21 @@
/*
Warnings:
- You are about to drop the column `city` on the `Vendor` table. All the data in the column will be lost.
- You are about to drop the column `country` on the `Vendor` table. All the data in the column will be lost.
- You are about to drop the column `postalCode` on the `Vendor` table. All the data in the column will be lost.
- You are about to drop the column `state` on the `Vendor` table. All the data in the column will be lost.
- You are about to drop the column `street` on the `Vendor` table. All the data in the column will be lost.
- Added the required column `addressId` to the `Vendor` table without a default value. This is not possible if the table is not empty.
*/
-- AlterTable
ALTER TABLE "Vendor" DROP COLUMN "city",
DROP COLUMN "country",
DROP COLUMN "postalCode",
DROP COLUMN "state",
DROP COLUMN "street",
ADD COLUMN "addressId" TEXT NOT NULL;
-- AddForeignKey
ALTER TABLE "Vendor" ADD CONSTRAINT "Vendor_addressId_fkey" FOREIGN KEY ("addressId") REFERENCES "Address"("id") ON DELETE RESTRICT ON UPDATE CASCADE;