chore: migration
This commit is contained in:
parent
0a4ae33a8a
commit
de5bb96422
1 changed files with 16 additions and 0 deletions
16
prisma/migrations/20241028043049_update_enum/migration.sql
Normal file
16
prisma/migrations/20241028043049_update_enum/migration.sql
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
Warnings:
|
||||
|
||||
- The values [Invoice] on the enum `QuotationStatus` will be removed. If these variants are still used in the database, this will fail.
|
||||
|
||||
*/
|
||||
-- AlterEnum
|
||||
BEGIN;
|
||||
CREATE TYPE "QuotationStatus_new" AS ENUM ('Issued', 'Accepted', 'PaymentPending', 'PaymentInProcess', 'PaymentSuccess', 'ProcessComplete', 'Canceled');
|
||||
ALTER TABLE "Quotation" ALTER COLUMN "quotationStatus" DROP DEFAULT;
|
||||
ALTER TABLE "Quotation" ALTER COLUMN "quotationStatus" TYPE "QuotationStatus_new" USING ("quotationStatus"::text::"QuotationStatus_new");
|
||||
ALTER TYPE "QuotationStatus" RENAME TO "QuotationStatus_old";
|
||||
ALTER TYPE "QuotationStatus_new" RENAME TO "QuotationStatus";
|
||||
DROP TYPE "QuotationStatus_old";
|
||||
ALTER TABLE "Quotation" ALTER COLUMN "quotationStatus" SET DEFAULT 'Issued';
|
||||
COMMIT;
|
||||
Loading…
Add table
Add a link
Reference in a new issue