This repository has been archived by the owner on May 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: migrate pa to pa-IN and remove CV -> SC language mapping
- Loading branch information
1 parent
418567d
commit d9f5f04
Showing
4 changed files
with
32 additions
and
15 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
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,12 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
up: (queryInterface) => { | ||
return queryInterface.sequelize.query(` | ||
UPDATE Sentences | ||
SET localeId="pa-IN" | ||
WHERE localeId="pa" | ||
`); | ||
}, | ||
down: () => Promise.resolve(), | ||
}; |
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,11 @@ | ||
'use strict'; | ||
|
||
module.exports = { | ||
up: async (queryInterface) => { | ||
await queryInterface.sequelize.query("UPDATE Users SET languages = REPLACE(languages, 'pa', 'pa-IN') WHERE languages='pa'"); | ||
await queryInterface.sequelize.query("UPDATE Users SET languages = REPLACE(languages, 'pa,', 'pa-IN,') WHERE languages LIKE 'pa,%'"); | ||
await queryInterface.sequelize.query("UPDATE Users SET languages = REPLACE(languages, ',pa,', ',pa-IN,') WHERE languages LIKE '%,pa,%'"); | ||
await queryInterface.sequelize.query("UPDATE Users SET languages = REPLACE(languages, ',pa', ',pa-IN') WHERE languages LIKE '%,pa'"); | ||
}, | ||
down: () => Promise.resolve(), | ||
}; |