12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- /*
- Warnings:
- - You are about to drop the column `tag` on the `categories` table. All the data in the column will be lost.
- - You are about to drop the column `contract_expired_date` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `contract_start_date` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `contract_value_max` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `contract_value_min` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `negative_notes` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `positive_notes` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `simrs_type` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the column `status` on the `vendor_experiences` table. All the data in the column will be lost.
- - You are about to drop the `category_links` table. If the table is not empty, all the data it contains will be lost.
- - Added the required column `name` to the `categories` table without a default value. This is not possible if the table is not empty.
- - Added the required column `user_id` to the `vendor_experiences` table without a default value. This is not possible if the table is not empty.
- */
- -- DropForeignKey
- ALTER TABLE "category_links" DROP CONSTRAINT "category_links_category_id_fkey";
- -- AlterTable
- ALTER TABLE "categories" DROP COLUMN "tag",
- ADD COLUMN "name" TEXT NOT NULL;
- -- AlterTable
- ALTER TABLE "vendor_experiences" DROP COLUMN "contract_expired_date",
- DROP COLUMN "contract_start_date",
- DROP COLUMN "contract_value_max",
- DROP COLUMN "contract_value_min",
- DROP COLUMN "negative_notes",
- DROP COLUMN "positive_notes",
- DROP COLUMN "simrs_type",
- DROP COLUMN "status",
- ADD COLUMN "category_id" TEXT,
- ADD COLUMN "userKeycloakId" TEXT,
- ADD COLUMN "user_id" TEXT NOT NULL;
- -- DropTable
- DROP TABLE "category_links";
- -- AddForeignKey
- ALTER TABLE "vendor_experiences" ADD CONSTRAINT "vendor_experiences_category_id_fkey" FOREIGN KEY ("category_id") REFERENCES "categories"("id") ON DELETE SET NULL ON UPDATE CASCADE;
- -- AddForeignKey
- ALTER TABLE "vendor_experiences" ADD CONSTRAINT "vendor_experiences_user_id_fkey" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE RESTRICT ON UPDATE CASCADE;
- -- AddForeignKey
- ALTER TABLE "vendor_experiences" ADD CONSTRAINT "vendor_experiences_userKeycloakId_fkey" FOREIGN KEY ("userKeycloakId") REFERENCES "keycloak_users"("id") ON DELETE SET NULL ON UPDATE CASCADE;
|