Migration add fields isDeleted #210

This commit is contained in:
harid 2026-02-12 11:47:53 +07:00
parent 3c9e3a1bb6
commit 65e3740cc2
82 changed files with 499 additions and 180 deletions

View file

@ -6679,7 +6679,7 @@ export class CommandController extends Controller {
profileEdu.profileId = profile.id;
const educationLevel = await this.profileEducationRepo.findOne({
select: ["id", "level", "profileId"],
where: { profileId: profile.id },
where: { profileId: profile.id, isDeleted: false },
order: { level: "DESC" },
});
profileEdu.level = educationLevel == null ? 1 : educationLevel.level + 1;
@ -6871,7 +6871,7 @@ export class CommandController extends Controller {
// Insignia
if (_oldInsigniaIds.length > 0) {
const _insignias = await this.insigniaRepo.find({
where: { id: In(_oldInsigniaIds) },
where: { id: In(_oldInsigniaIds), isDeleted: false },
order: { createdAt: "ASC" },
});
for (const oldInsignia of _insignias) {