Remove template model and related functionality (prisma/postgresql-schema.prisma, src/api/services/template.service.ts)

This commit removes the Template model, including its related functionality, from the project. The template table has been removed from the database schema, and all related functions and methods in the template service have been deleted. This change was made because the project now uses the persistence of the meta, eliminating the need for a separate template model.

Please note that this change may affect other parts of the application that rely on the Template model. Ensure that all necessary adjustments have been made before merging this commit.
This commit is contained in:
Davidson Gomes
2024-07-12 13:25:59 -03:00
parent ca3dadfb35
commit c782305456
3 changed files with 15 additions and 31 deletions

View File

@@ -75,7 +75,6 @@ model Instance {
MessageUpdate MessageUpdate[]
TypebotSession TypebotSession[]
TypebotSetting TypebotSetting?
Template Template[]
}
model Session {
@@ -306,14 +305,3 @@ model TypebotSetting {
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
instanceId String @unique
}
model Template {
id String @id @default(cuid())
name String @db.VarChar(255)
language String @db.VarChar(255)
templateId String @unique @db.VarChar(255)
createdAt DateTime? @default(now()) @db.Timestamp
updatedAt DateTime @updatedAt @db.Timestamp
Instance Instance @relation(fields: [instanceId], references: [id], onDelete: Cascade)
instanceId String
}