Migrationsskript Bedarfsausweis Wohnen Limit 10
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
import { Enums, prisma } from "#lib/server/prisma.js";
|
import { Enums, prisma } from "#lib/server/prisma.js";
|
||||||
|
|
||||||
let start = 1;
|
let start = 1;
|
||||||
let limit = 1;
|
let limit = 10;
|
||||||
|
|
||||||
const existing_bedarfsausweiswohnen_list = await prisma.bedarfsausweisWohnen.findMany({
|
const existing_bedarfsausweiswohnen_list = await prisma.bedarfsausweisWohnen.findMany({
|
||||||
where: {
|
where: {
|
||||||
@@ -20,18 +20,18 @@ 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