Remove flag relation select (#3588)

* Remove feature flag on relation and select

* Move packages back to twenty-server to enable smaller build without using nx

* Fix package.json
This commit is contained in:
Charles Bochet
2024-01-23 09:59:00 +01:00
committed by GitHub
parent 6aad59d0be
commit a7265fa3b4
13 changed files with 172 additions and 135 deletions

View File

@ -1,17 +0,0 @@
import { PrismaClient, Prisma } from '@prisma/client';
import { camelCase } from 'src/utils/camel-case';
const prisma = new PrismaClient();
export default async () => {
const models = Prisma.dmmf.datamodel.models;
const modelNames = models.map((model) => model.name);
const entities = modelNames.map((modelName) => camelCase(modelName));
await prisma.$transaction(
entities.map((entity) => {
return prisma[entity].deleteMany();
}),
);
};

View File

@ -1,5 +1,3 @@
import resetDb from './reset-db';
global.beforeEach(() => {
// resetDb();
});