From 79b6638ae9b36c4bebe1703f74379beedffde38e Mon Sep 17 00:00:00 2001 From: Carifio24 Date: Mon, 16 Sep 2024 14:42:36 -0400 Subject: [PATCH] Specify engine in client rather than in each model. --- src/database.ts | 3 ++- src/models/api_key.ts | 1 - src/models/class.ts | 1 - src/models/dashboard_class_group.ts | 1 - src/models/dummy_class.ts | 3 +-- src/models/educator.ts | 1 - src/models/ignore_student.ts | 1 - src/models/question.ts | 1 - src/models/session.ts | 1 - src/models/stage.ts | 1 - src/models/stage_state.ts | 1 - src/models/story.ts | 1 - src/models/story_class.ts | 1 - src/models/story_state.ts | 1 - src/models/student.ts | 1 - src/models/student_options.ts | 1 - src/stories/hubbles_law/models/async_merged_student_classes.ts | 1 - src/stories/hubbles_law/models/galaxy.ts | 1 - src/stories/hubbles_law/models/hubble_class_data.ts | 1 - src/stories/hubbles_law/models/hubble_measurement.ts | 1 - src/stories/hubbles_law/models/hubble_student_data.ts | 1 - src/stories/hubbles_law/models/sample_measurement.ts | 1 - src/stories/hubbles_law/models/sync_merged_classes.ts | 1 - src/stories/minids/models/eclipse_response.ts | 1 - src/stories/solar-eclipse-2024/models/eclipse_data.ts | 1 - 25 files changed, 3 insertions(+), 26 deletions(-) diff --git a/src/database.ts b/src/database.ts index 068d792..f9e42c3 100644 --- a/src/database.ts +++ b/src/database.ts @@ -79,7 +79,8 @@ export function getDatabaseConnection(options?: DBConnectionOptions) { host: process.env.DB_HOSTNAME as string, dialect: "mysql", define: { - timestamps: false + timestamps: false, + engine: "InnoDB", } }); diff --git a/src/models/api_key.ts b/src/models/api_key.ts index 81cceed..a1f4f0d 100644 --- a/src/models/api_key.ts +++ b/src/models/api_key.ts @@ -35,6 +35,5 @@ export function initializeAPIKeyModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/class.ts b/src/models/class.ts index 0b6dd62..887058d 100644 --- a/src/models/class.ts +++ b/src/models/class.ts @@ -64,6 +64,5 @@ export function initializeClassModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/dashboard_class_group.ts b/src/models/dashboard_class_group.ts index 4e0e28d..e3f9221 100644 --- a/src/models/dashboard_class_group.ts +++ b/src/models/dashboard_class_group.ts @@ -31,6 +31,5 @@ export function initializeDashboardClassGroupModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/dummy_class.ts b/src/models/dummy_class.ts index 4309472..c395955 100644 --- a/src/models/dummy_class.ts +++ b/src/models/dummy_class.ts @@ -29,6 +29,5 @@ export function initializeDummyClassModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); -} \ No newline at end of file +} diff --git a/src/models/educator.ts b/src/models/educator.ts index 6c43f12..cdd226d 100644 --- a/src/models/educator.ts +++ b/src/models/educator.ts @@ -101,7 +101,6 @@ export function initializeEducatorModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", indexes: [ { unique: true, diff --git a/src/models/ignore_student.ts b/src/models/ignore_student.ts index d5b067c..aa8412a 100644 --- a/src/models/ignore_student.ts +++ b/src/models/ignore_student.ts @@ -29,6 +29,5 @@ export function initializeIgnoreStudentModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/question.ts b/src/models/question.ts index 72a52ce..a28cbc3 100644 --- a/src/models/question.ts +++ b/src/models/question.ts @@ -67,7 +67,6 @@ export function initializeQuestionModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", indexes: [ { fields: ["tag"] diff --git a/src/models/session.ts b/src/models/session.ts index 7d15920..275138a 100644 --- a/src/models/session.ts +++ b/src/models/session.ts @@ -29,7 +29,6 @@ export function initializeSessionModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", tableName: "Sessions" }); } diff --git a/src/models/stage.ts b/src/models/stage.ts index 8bc5a82..b475c48 100644 --- a/src/models/stage.ts +++ b/src/models/stage.ts @@ -33,7 +33,6 @@ export function initializeStageModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", indexes: [ { unique: true, diff --git a/src/models/stage_state.ts b/src/models/stage_state.ts index 8e224a6..2508a28 100644 --- a/src/models/stage_state.ts +++ b/src/models/stage_state.ts @@ -46,6 +46,5 @@ export function initializeStageStateModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/story.ts b/src/models/story.ts index 372ae42..041fbd9 100644 --- a/src/models/story.ts +++ b/src/models/story.ts @@ -26,6 +26,5 @@ export function initializeStoryModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/story_class.ts b/src/models/story_class.ts index 62425cb..cecf283 100644 --- a/src/models/story_class.ts +++ b/src/models/story_class.ts @@ -35,6 +35,5 @@ export function initializeClassStoryModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/story_state.ts b/src/models/story_state.ts index 1163f15..10d185f 100644 --- a/src/models/story_state.ts +++ b/src/models/story_state.ts @@ -40,6 +40,5 @@ export function initializeStoryStateModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/models/student.ts b/src/models/student.ts index c3a5ac4..880de77 100644 --- a/src/models/student.ts +++ b/src/models/student.ts @@ -110,7 +110,6 @@ export function initializeStudentModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", indexes: [ { unique: true, diff --git a/src/models/student_options.ts b/src/models/student_options.ts index b7e4c50..25f2a1c 100644 --- a/src/models/student_options.ts +++ b/src/models/student_options.ts @@ -49,6 +49,5 @@ export function initializeStudentOptionsModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/hubbles_law/models/async_merged_student_classes.ts b/src/stories/hubbles_law/models/async_merged_student_classes.ts index 2868e8a..79d9cb2 100644 --- a/src/stories/hubbles_law/models/async_merged_student_classes.ts +++ b/src/stories/hubbles_law/models/async_merged_student_classes.ts @@ -44,6 +44,5 @@ export function initializeAsyncMergedHubbleStudentClassesModel(sequelize: Sequel } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/hubbles_law/models/galaxy.ts b/src/stories/hubbles_law/models/galaxy.ts index 10d4938..431afd6 100644 --- a/src/stories/hubbles_law/models/galaxy.ts +++ b/src/stories/hubbles_law/models/galaxy.ts @@ -86,6 +86,5 @@ export function initializeGalaxyModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/hubbles_law/models/hubble_class_data.ts b/src/stories/hubbles_law/models/hubble_class_data.ts index d36a3fb..1529e36 100644 --- a/src/stories/hubbles_law/models/hubble_class_data.ts +++ b/src/stories/hubbles_law/models/hubble_class_data.ts @@ -43,7 +43,6 @@ export function initializeHubbleClassDataModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", freezeTableName: true }); } diff --git a/src/stories/hubbles_law/models/hubble_measurement.ts b/src/stories/hubbles_law/models/hubble_measurement.ts index 5f6ade5..55d5c2f 100644 --- a/src/stories/hubbles_law/models/hubble_measurement.ts +++ b/src/stories/hubbles_law/models/hubble_measurement.ts @@ -82,6 +82,5 @@ export function initializeHubbleMeasurementModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/hubbles_law/models/hubble_student_data.ts b/src/stories/hubbles_law/models/hubble_student_data.ts index 458c489..3b73e60 100644 --- a/src/stories/hubbles_law/models/hubble_student_data.ts +++ b/src/stories/hubbles_law/models/hubble_student_data.ts @@ -43,7 +43,6 @@ export function initializeHubbleStudentDataModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", freezeTableName: true }); } diff --git a/src/stories/hubbles_law/models/sample_measurement.ts b/src/stories/hubbles_law/models/sample_measurement.ts index d106e73..f8088e3 100644 --- a/src/stories/hubbles_law/models/sample_measurement.ts +++ b/src/stories/hubbles_law/models/sample_measurement.ts @@ -89,6 +89,5 @@ export function initializeSampleHubbleMeasurementModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/hubbles_law/models/sync_merged_classes.ts b/src/stories/hubbles_law/models/sync_merged_classes.ts index c35fbe7..ff1c04c 100644 --- a/src/stories/hubbles_law/models/sync_merged_classes.ts +++ b/src/stories/hubbles_law/models/sync_merged_classes.ts @@ -34,6 +34,5 @@ export function initializeSyncMergedHubbleClassesModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/minids/models/eclipse_response.ts b/src/stories/minids/models/eclipse_response.ts index 64c4e02..712bb3f 100644 --- a/src/stories/minids/models/eclipse_response.ts +++ b/src/stories/minids/models/eclipse_response.ts @@ -51,6 +51,5 @@ export function initializeEclipseMiniResponseModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB" }); } diff --git a/src/stories/solar-eclipse-2024/models/eclipse_data.ts b/src/stories/solar-eclipse-2024/models/eclipse_data.ts index 067137c..bd5e00d 100644 --- a/src/stories/solar-eclipse-2024/models/eclipse_data.ts +++ b/src/stories/solar-eclipse-2024/models/eclipse_data.ts @@ -103,6 +103,5 @@ export function initializeSolarEclipse2024DataModel(sequelize: Sequelize) { } }, { sequelize, - engine: "InnoDB", }); }