Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: delete demo bal #478

Merged
merged 4 commits into from
Sep 23, 2024
Merged

fix: delete demo bal #478

merged 4 commits into from
Sep 23, 2024

Conversation

fufeck
Copy link
Collaborator

@fufeck fufeck commented Sep 19, 2024

CONTEXT

On ne pas supprimer une BAL en demo, cela sort l'erreur:
update or delete on table "bases_locales" violates foreign key constraint "FK_dd823e556d4b255deae92952f03" on table "numeros"

FIX

Ajout de ON DELETE CASCADE sur la contraint FK_dd823e556d4b255deae92952f03

@fufeck fufeck requested a review from MaGOs92 September 19, 2024 13:33
Copy link
Collaborator

@MaGOs92 MaGOs92 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tests LGTM, à voir pour le commentaire sur la migration mais sinon ok pour moi

);
}

public async down(queryRunner: QueryRunner): Promise<void> {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Je vois pas trop l'utilité d'implémenter le down si c'est pour remettre la même chose que dans le up.
Normalement le down est là pour revert ce qui a été fait dans le up

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Il est implémenter par default avec la commande de typeorm:generate

@fufeck fufeck merged commit 6203c5d into master Sep 23, 2024
5 checks passed
@fufeck fufeck deleted the fufeck_fix_delete-demo-bal branch September 23, 2024 18:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants