Skip to content
GitLab
Explorer
Connexion
S'inscrire
Navigation principale
Rechercher ou aller à…
Projet
P
parlote-facil
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Wiki
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Extraits de code
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Déploiement
Releases
Registre de paquets
Registre de conteneur
Registre de modèles
Opération
Environnements
Modules Terraform
Surveillance
Incidents
Analyse
Données d'analyse des chaînes de valeur
Analyse des contributeurs
Données d'analyse CI/CD
Données d'analyse du dépôt
Expériences du modèle
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
facil
parlote-facil
Validations
03e8aa31
Valider
03e8aa31
rédigé
14 years ago
par
zhitomirskiyi
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
fixed notifications migration
parent
ac50a011
Aucune branche associée trouvée
Branches contenant la validation
Aucune étiquette associée trouvée
Étiquettes contenant la validation
Aucune requête de fusion associée trouvée
Modifications
1
Masquer les modifications d'espaces
En ligne
Côte à côte
Affichage de
1 fichier modifié
db/migrate/20110130072907_notification_multiple_people.rb
+7
-2
7 ajouts, 2 suppressions
db/migrate/20110130072907_notification_multiple_people.rb
avec
7 ajouts
et
2 suppressions
db/migrate/20110130072907_notification_multiple_people.rb
+
7
−
2
Voir le fichier @
03e8aa31
...
@@ -38,7 +38,8 @@ class NotificationMultiplePeople < ActiveRecord::Migration
...
@@ -38,7 +38,8 @@ class NotificationMultiplePeople < ActiveRecord::Migration
"WHERE n1.keep_id != n2.id "
+
"WHERE n1.keep_id != n2.id "
+
"AND n1.target_type = n2.target_type AND n1.target_id = n2.target_id "
+
"AND n1.target_type = n2.target_type AND n1.target_id = n2.target_id "
+
"AND n1.recipient_id = n2.recipient_id AND n1.action = n2.action "
+
"AND n1.recipient_id = n2.recipient_id AND n1.action = n2.action "
+
"AND (n1.action = 'comment_on_post' OR n1.action = 'also_commented'))"
"AND (n1.action = 'comment_on_post' OR n1.action = 'also_commented') "
+
"GROUP BY n2.actor_id , n2.target_type , n2.target_id , n2.recipient_id , n2.action)"
#have the notifications actors reference the notifications that need to be kept
#have the notifications actors reference the notifications that need to be kept
execute
"UPDATE notification_actors, keep_delete "
+
execute
"UPDATE notification_actors, keep_delete "
+
...
@@ -48,7 +49,11 @@ class NotificationMultiplePeople < ActiveRecord::Migration
...
@@ -48,7 +49,11 @@ class NotificationMultiplePeople < ActiveRecord::Migration
#delete all the notifications that need to be deleted
#delete all the notifications that need to be deleted
execute
"DELETE notifications.* "
+
execute
"DELETE notifications.* "
+
"FROM notifications, keep_delete "
+
"FROM notifications, keep_delete "
+
"WHERE notifications.id = keep_delete.delete_id "
"WHERE notifications.id != keep_delete.keep_id AND "
+
"notifications.target_type = keep_delete.target_type AND "
+
"notifications.target_id = keep_delete.target_id AND "
+
"notifications.recipient_id = keep_delete.recipient_id AND "
+
"notifications.action = keep_delete.action"
remove_column
:notifications
,
:actor_id
remove_column
:notifications
,
:actor_id
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter