From 9dff4aa0e1caf48b7410a9cecd9ca14d845a2a37 Mon Sep 17 00:00:00 2001 From: enxtur Date: Mon, 22 Apr 2024 23:12:50 +0800 Subject: [PATCH] HPC-9142: Remove entitiesAssociation model --- src/db/index.ts | 2 -- src/db/models/entitiesAssociation.ts | 17 ----------------- 2 files changed, 19 deletions(-) delete mode 100644 src/db/models/entitiesAssociation.ts diff --git a/src/db/index.ts b/src/db/index.ts index aa131349..7bc952c5 100644 --- a/src/db/index.ts +++ b/src/db/index.ts @@ -28,7 +28,6 @@ import emergency from './models/emergency'; import emergencyLocation from './models/emergencyLocation'; import endpointLog from './models/endpointLog'; import endpointUsage from './models/endpointUsage'; -import entitiesAssociation from './models/entitiesAssociation'; import entityPrototype from './models/entityPrototype'; import expiredData from './models/expiredData'; import externalData from './models/externalData'; @@ -141,7 +140,6 @@ const initializeTables = (conn: Knex) => ({ emergencyLocation: emergencyLocation(conn), endpointLog: endpointLog(conn), endpointUsage: endpointUsage(conn), - entitiesAssociation: entitiesAssociation(conn), entityPrototype: entityPrototype(conn), expiredData: expiredData(conn), externalData: externalData(conn), diff --git a/src/db/models/entitiesAssociation.ts b/src/db/models/entitiesAssociation.ts deleted file mode 100644 index 4d7b46a3..00000000 --- a/src/db/models/entitiesAssociation.ts +++ /dev/null @@ -1,17 +0,0 @@ -import * as t from 'io-ts'; -import { defineSequelizeModel } from '../util/sequelize-model'; -import { GOVERNING_ENTITY_ID } from './governingEntity'; -import { PLAN_ENTITY_ID } from './planEntity'; - -export default defineSequelizeModel({ - tableName: 'entitiesAssociation', - fields: { - required: { - parentId: { kind: 'branded-integer', brand: GOVERNING_ENTITY_ID }, - parentType: { kind: 'checked', type: t.literal('governingEntity') }, - childId: { kind: 'branded-integer', brand: PLAN_ENTITY_ID }, - childType: { kind: 'checked', type: t.literal('planEntity') }, - }, - }, - softDeletionEnabled: false, -});