Skip to content

Commit

Permalink
chore: add project_id column to translations and jobs tables
Browse files Browse the repository at this point in the history
* new project_id column will help us identify which project to send
  translations to, and which project a job will live under.
* with this information, we can use multiple projects which is how we
  will handle machine vs human translation -- one project for each.
  • Loading branch information
moonlight-komorebi committed Nov 11, 2021
1 parent 6d07ffd commit 5ae1535
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions scripts/actions/translation_workflow/models/job.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,10 @@ module.exports = (sequelize, DataTypes) => {
deferrable: Deferrable.INITIALLY_IMMEDIATE,
},
},
project_id: {
type: DataTypes.TEXT,
allowNull: true,
},
},
{
createdAt: 'date_created',
Expand Down
4 changes: 4 additions & 0 deletions scripts/actions/translation_workflow/models/translation.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ module.exports = (sequelize, DataTypes) => {
deferrable: Deferrable.INITIALLY_IMMEDIATE,
},
},
project_id: {
type: DataTypes.TEXT,
allowNull: true,
},
},
{
createdAt: 'date_created',
Expand Down
4 changes: 3 additions & 1 deletion scripts/actions/translation_workflow/models/typedefs.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* @property {number} status - numeric value of status enum
* @property {Date} date_created timestamp indicating when record was created
* @property {Date} date_modified timestamp indicating when record was last updated
* @property {string} project_id identifier of project from translation vendor job is associated with
*/

/**
Expand All @@ -28,7 +29,8 @@
* @property {string} status numeric value of status enum
* @property {number} locale numeric value of locale enum
* @property {Date} date_created timestamp indicating when record was created
* @property {Date} date_modified
* @property {Date} date_modified timestamp indicating when record was last updated
* @property {string} project_id identifier of project from translation vendor translation is associated with
*/

/**
Expand Down

0 comments on commit 5ae1535

Please sign in to comment.