Skip to content

Commit

Permalink
Specify engine in client rather than in each model.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Sep 28, 2024
1 parent 47fd022 commit 79b6638
Show file tree
Hide file tree
Showing 25 changed files with 3 additions and 26 deletions.
3 changes: 2 additions & 1 deletion src/database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
});

Expand Down
1 change: 0 additions & 1 deletion src/models/api_key.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ export function initializeAPIKeyModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,5 @@ export function initializeClassModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/dashboard_class_group.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ export function initializeDashboardClassGroupModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
3 changes: 1 addition & 2 deletions src/models/dummy_class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ export function initializeDummyClassModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
}
1 change: 0 additions & 1 deletion src/models/educator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ export function initializeEducatorModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
indexes: [
{
unique: true,
Expand Down
1 change: 0 additions & 1 deletion src/models/ignore_student.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,5 @@ export function initializeIgnoreStudentModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/question.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,6 @@ export function initializeQuestionModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
indexes: [
{
fields: ["tag"]
Expand Down
1 change: 0 additions & 1 deletion src/models/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ export function initializeSessionModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
tableName: "Sessions"
});
}
1 change: 0 additions & 1 deletion src/models/stage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ export function initializeStageModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
indexes: [
{
unique: true,
Expand Down
1 change: 0 additions & 1 deletion src/models/stage_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,5 @@ export function initializeStageStateModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/story.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,5 @@ export function initializeStoryModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/story_class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,5 @@ export function initializeClassStoryModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/story_state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,5 @@ export function initializeStoryStateModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/models/student.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,6 @@ export function initializeStudentModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
indexes: [
{
unique: true,
Expand Down
1 change: 0 additions & 1 deletion src/models/student_options.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,5 @@ export function initializeStudentOptionsModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,5 @@ export function initializeAsyncMergedHubbleStudentClassesModel(sequelize: Sequel
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/galaxy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,5 @@ export function initializeGalaxyModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/hubble_class_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function initializeHubbleClassDataModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
freezeTableName: true
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/hubble_measurement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,5 @@ export function initializeHubbleMeasurementModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/hubble_student_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ export function initializeHubbleStudentDataModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
freezeTableName: true
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/sample_measurement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,5 @@ export function initializeSampleHubbleMeasurementModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/hubbles_law/models/sync_merged_classes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,5 @@ export function initializeSyncMergedHubbleClassesModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/minids/models/eclipse_response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,5 @@ export function initializeEclipseMiniResponseModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB"
});
}
1 change: 0 additions & 1 deletion src/stories/solar-eclipse-2024/models/eclipse_data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,5 @@ export function initializeSolarEclipse2024DataModel(sequelize: Sequelize) {
}
}, {
sequelize,
engine: "InnoDB",
});
}

0 comments on commit 79b6638

Please sign in to comment.