AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.
fix(server): Add missing PG migrations (#7619)
Aarushida2111bafb17
diff --git a/rnd/autogpt_server/postgres/migrations/20240726131311_node_input_unique_constraint/migration.sql b/rnd/autogpt_server/postgres/migrations/20240726131311_node_input_unique_constraint/migration.sqlnew file mode 100644index 0000000000..284457cd52--- /dev/null+++ b/rnd/autogpt_server/postgres/migrations/20240726131311_node_input_unique_constraint/migration.sql@@ -0,0 +1,8 @@+/*+ Warnings:++ - A unique constraint covering the columns `[referencedByInputExecId,referencedByOutputExecId,name]` on the table `AgentNodeExecutionInputOutput` will be added. If there are existing duplicate values, this will fail.++*/+-- CreateIndex+CREATE UNIQUE INDEX "AgentNodeExecutionInputOutput_referencedByInputExecId_refer_key" ON "AgentNodeExecutionInputOutput"("referencedByInputExecId", "referencedByOutputExecId", "name");diff --git a/rnd/autogpt_server/postgres/schema.prisma b/rnd/autogpt_server/postgres/schema.prismaindex 1aabe7bbfb..d87055b024 100644--- a/rnd/autogpt_server/postgres/schema.prisma+++ b/rnd/autogpt_server/postgres/schema.prisma@@ -127,6 +127,9 @@ model AgentNodeExecutionInputOutput {ReferencedByInputExec AgentNodeExecution? @relation("AgentNodeExecutionInput", fields: [referencedByInputExecId], references: [id])referencedByOutputExecId String?ReferencedByOutputExec AgentNodeExecution? @relation("AgentNodeExecutionOutput", fields: [referencedByOutputExecId], references: [id])++ // Input and Output pin names are unique for each AgentNodeExecution.+ @@unique([referencedByInputExecId, referencedByOutputExecId, name])}// This model describes the recurring execution schedule of an Agent.@@ -145,4 +148,4 @@ model AgentGraphExecutionSchedule {lastUpdated DateTime @updatedAt@@index([isEnabled])-}+}\ No newline at end of file