[FEATURE]: ajout d'un index sur updatedAt sur la table assessments#16568
Open
sandalfon wants to merge 1 commit into
Open
[FEATURE]: ajout d'un index sur updatedAt sur la table assessments#16568sandalfon wants to merge 1 commit into
sandalfon wants to merge 1 commit into
Conversation
|
Choisir les applications à déployer :
Important N'oubliez pas de déployer l'API pour pouvoir accéder aux fronts et/ou à l’API MaDDo. |
|
|
||
| const up = async function (knex) { | ||
| await knex.schema.table(TABLE_NAME, function (table) { | ||
| table.index(COLUMN_NAME); |
Member
There was a problem hiding this comment.
la table assessments n'est pas une petite table. Pour éviter les problèmes d'availability sur la prod je recommande plutôt :
- De demander aux captains la création de l'index en mode
CONCURRENCYsur la prod (entre midi et deux par ex) - Une fois cela fait, éditer cette PR pour faire un
CREATE INDEX IF NOT EXISTS
Member
There was a problem hiding this comment.
Pour info, on ne peut pas créer un index en CONCURRENTLY dans une migration Knex.
Les migrations Knex doivent obligatoirement être jouées dans une transaction, or la clause CONCURRENTLY impose l'exécution hors transaction
Contributor
Author
There was a problem hiding this comment.
oui on comptait bien passer par les capitaines pour la création
Signed-off-by: Gilles Vieira <vieira.gille@gmail.com>
21341a8 to
e37396b
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🪧 Problème
Dans le cadre de l'historisation des answers on va requeter les assessemnts sur la date de mise à jour et c'est long
🌈 Proposition
ajout d'un index sur la table
✊ Remarques
🎉 Pour tester