Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Remove imperial type
Browse files Browse the repository at this point in the history
  • Loading branch information
anduong96 committed Nov 28, 2023
1 parent aa5e1a5 commit 7625b7f
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 3 deletions.
16 changes: 16 additions & 0 deletions prisma/migrations/20231128224600_/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
/*
Warnings:
- The values [IMPERIAL] on the enum `MeasurementType` will be removed. If these variants are still used in the database, this will fail.
*/
-- AlterEnum
BEGIN;
CREATE TYPE "MeasurementType_new" AS ENUM ('AMERICAN', 'METRIC');
ALTER TABLE "UserPreference" ALTER COLUMN "measurement" DROP DEFAULT;
ALTER TABLE "UserPreference" ALTER COLUMN "measurement" TYPE "MeasurementType_new" USING ("measurement"::text::"MeasurementType_new");
ALTER TYPE "MeasurementType" RENAME TO "MeasurementType_old";
ALTER TYPE "MeasurementType_new" RENAME TO "MeasurementType";
DROP TYPE "MeasurementType_old";
ALTER TABLE "UserPreference" ALTER COLUMN "measurement" SET DEFAULT 'AMERICAN';
COMMIT;
1 change: 0 additions & 1 deletion prisma/schema.prisma
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ enum FlightStatus {
enum MeasurementType {
AMERICAN
METRIC
IMPERIAL
}

enum DateFormatType {
Expand Down
1 change: 0 additions & 1 deletion schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,6 @@ scalar JSON @specifiedBy(url: "http://www.ecma-international.org/publications/fi

enum MeasurementType {
AMERICAN
IMPERIAL
METRIC
}

Expand Down
1 change: 0 additions & 1 deletion src/@generated/graphql/enums/MeasurementType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import { registerEnumType } from 'type-graphql';
export enum GQL_MeasurementType {
AMERICAN = 'AMERICAN',
METRIC = 'METRIC',
IMPERIAL = 'IMPERIAL',
}
registerEnumType(GQL_MeasurementType, {
name: 'MeasurementType',
Expand Down

0 comments on commit 7625b7f

Please sign in to comment.