mirror of
https://github.com/documenso/documenso.git
synced 2025-11-24 13:41:30 +10:00
fix: remove invalid seed
This commit is contained in:
@ -39,12 +39,24 @@ export const seedDatabase = async () => {
|
|||||||
update: {},
|
update: {},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
const documentIdToSeed = 'clmn0kv5k0000pe04vcqg5zla';
|
||||||
|
|
||||||
|
const oldSeededDocument = await prisma.documentData.findFirst({
|
||||||
|
where: {
|
||||||
|
id: documentIdToSeed,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
if (oldSeededDocument) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const examplePdfData = await prisma.documentData.upsert({
|
const examplePdfData = await prisma.documentData.upsert({
|
||||||
where: {
|
where: {
|
||||||
id: 'clmn0kv5k0000pe04vcqg5zla',
|
id: documentIdToSeed,
|
||||||
},
|
},
|
||||||
create: {
|
create: {
|
||||||
id: 'clmn0kv5k0000pe04vcqg5zla',
|
id: documentIdToSeed,
|
||||||
type: DocumentDataType.BYTES_64,
|
type: DocumentDataType.BYTES_64,
|
||||||
data: examplePdf,
|
data: examplePdf,
|
||||||
initialData: examplePdf,
|
initialData: examplePdf,
|
||||||
|
|||||||
Reference in New Issue
Block a user