Migrationsskript Bedarfsausweis Wohnen Test
This commit is contained in:
@@ -10,7 +10,7 @@ const existing_bedarfsausweiswohnen_list = await prisma.bedarfsausweisWohnen.fin
|
|||||||
});
|
});
|
||||||
|
|
||||||
for (const ausweis of existing_bedarfsausweiswohnen_list) {
|
for (const ausweis of existing_bedarfsausweiswohnen_list) {
|
||||||
if (ausweis.bestellt != false && ausweis.registriernummer == ""){
|
if (ausweis.bestellt == true && ausweis.registriernummer == ""){
|
||||||
console.log(
|
console.log(
|
||||||
'ID:' + ausweis.id +
|
'ID:' + ausweis.id +
|
||||||
' Reg.Nr:' + ausweis.registriernummer +
|
' Reg.Nr:' + ausweis.registriernummer +
|
||||||
@@ -20,16 +20,16 @@ for (const ausweis of existing_bedarfsausweiswohnen_list) {
|
|||||||
' Ausgestellt am: ' + ausweis.ausstellungsdatum
|
' Ausgestellt am: ' + ausweis.ausstellungsdatum
|
||||||
);
|
);
|
||||||
|
|
||||||
await prisma.bedarfsausweisWohnen.update({
|
// await prisma.bedarfsausweisWohnen.update({
|
||||||
where: {
|
// where: {
|
||||||
id: ausweis.id
|
// id: ausweis.id
|
||||||
},
|
// },
|
||||||
data: {
|
// data: {
|
||||||
bestellt: false,
|
// bestellt: false,
|
||||||
ausgestellt: false,
|
// ausgestellt: false,
|
||||||
ausstellungsdatum: null
|
// ausstellungsdatum: null
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
// if (start >= limit) break;
|
// if (start >= limit) break;
|
||||||
start++;
|
start++;
|
||||||
|
|||||||
Reference in New Issue
Block a user