-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90d44bb
commit 62e3b62
Showing
11 changed files
with
893 additions
and
479 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
34 changes: 0 additions & 34 deletions
34
db/migrations/20221115171244-create-mentor-groups-table.js
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
db/migrations/20221115171244-create-mentor-groups-table.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { QueryInterface } from "sequelize"; | ||
|
||
import { DataType } from "sequelize-typescript"; | ||
|
||
const firTypeEnum = ["edww", "edgg", "edmm"]; | ||
export const MENTOR_GROUPS_TABLE_NAME = "mentor_groups"; | ||
export const MENTOR_GROUPS_TABLE_ATTRIBUTES = { | ||
id: { | ||
type: DataType.INTEGER, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
name: { | ||
type: DataType.STRING(70), | ||
comment: "Name of mentor-group. Max length 70 chars", | ||
allowNull: false, | ||
}, | ||
fir: { | ||
type: DataType.ENUM(...firTypeEnum), | ||
allowNull: true, | ||
}, | ||
createdAt: DataType.DATE, | ||
updatedAt: DataType.DATE, | ||
}; | ||
|
||
export default { | ||
async up(queryInterface: QueryInterface) { | ||
await queryInterface.createTable(MENTOR_GROUPS_TABLE_NAME, MENTOR_GROUPS_TABLE_ATTRIBUTES); | ||
}, | ||
|
||
async down(queryInterface: QueryInterface) { | ||
await queryInterface.dropTable(MENTOR_GROUPS_TABLE_NAME); | ||
}, | ||
}; |
32 changes: 0 additions & 32 deletions
32
db/migrations/20221115171245-create-training-log-templates-table.js
This file was deleted.
Oops, something went wrong.
34 changes: 34 additions & 0 deletions
34
db/migrations/20221115171245-create-training-log-templates-table.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
import { QueryInterface } from "sequelize"; | ||
|
||
import { DataType } from "sequelize-typescript"; | ||
|
||
export const TRAINING_LOG_TEMPLATES_TABLE_NAME = "training_log_templates"; | ||
|
||
export const TRAINING_LOG_TEMPLATES_ATTRIBUTES = { | ||
id: { | ||
type: DataType.INTEGER, | ||
primaryKey: true, | ||
autoIncrement: true, | ||
}, | ||
name: { | ||
type: DataType.STRING, | ||
allowNull: false, | ||
}, | ||
content: { | ||
type: DataType.JSON, | ||
allowNull: false, | ||
defaultValue: [], | ||
}, | ||
createdAt: DataType.DATE, | ||
updatedAt: DataType.DATE, | ||
}; | ||
|
||
export default { | ||
async up(queryInterface: QueryInterface) { | ||
await queryInterface.createTable(TRAINING_LOG_TEMPLATES_TABLE_NAME, TRAINING_LOG_TEMPLATES_ATTRIBUTES); | ||
}, | ||
|
||
async down(queryInterface: QueryInterface) { | ||
await queryInterface.dropTable(TRAINING_LOG_TEMPLATES_TABLE_NAME); | ||
}, | ||
}; |
Oops, something went wrong.