Migrationsskript Bedarfsausweis Wohnen Limit 10
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import { Enums, prisma } from "#lib/server/prisma.js";
|
||||
|
||||
let start = 1;
|
||||
let limit = 1;
|
||||
let limit = 10;
|
||||
|
||||
const existing_bedarfsausweiswohnen_list = await prisma.bedarfsausweisWohnen.findMany({
|
||||
where: {
|
||||
@@ -20,18 +20,18 @@ for (const ausweis of existing_bedarfsausweiswohnen_list) {
|
||||
' Ausgestellt am: ' + ausweis.ausstellungsdatum
|
||||
);
|
||||
|
||||
// await prisma.bedarfsausweisWohnen.update({
|
||||
// where: {
|
||||
// id: ausweis.id
|
||||
// },
|
||||
// data: {
|
||||
// bestellt: false,
|
||||
// ausgestellt: false,
|
||||
// ausstellungsdatum: null
|
||||
// }
|
||||
// });
|
||||
await prisma.bedarfsausweisWohnen.update({
|
||||
where: {
|
||||
id: ausweis.id
|
||||
},
|
||||
data: {
|
||||
bestellt: false,
|
||||
ausgestellt: false,
|
||||
ausstellungsdatum: null
|
||||
}
|
||||
});
|
||||
|
||||
// if (start >= limit) break;
|
||||
if (start >= limit) break;
|
||||
start++;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user