16 lines
780 B
PL/PgSQL
16 lines
780 B
PL/PgSQL
/*
|
|
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;
|