Skip to content

🪢 Open source agent evals & observability: Trace, evaluate, and improve LLM applications with one open platform.

chore: adds mig for latest tag on prompts (#1907)

Hassieb Pakzada9cac5d6d2da
diff --git a/packages/shared/prisma/migrations/20240429194411_add_latest_prompt_tag/migration.sql b/packages/shared/prisma/migrations/20240429194411_add_latest_prompt_tag/migration.sql
new file mode 100644
index 0000000000..8ee55829de
--- /dev/null
+++ b/packages/shared/prisma/migrations/20240429194411_add_latest_prompt_tag/migration.sql
@@ -0,0 +1,15 @@
+UPDATE
+ prompts
+SET
+ labels = array_append(labels, 'latest')
+WHERE
+ id = (
+ SELECT
+ id
+ FROM
+ prompts AS p2
+ WHERE
+ p2.name = prompts.name
+ ORDER BY
+ created_at DESC
+ LIMIT 1);
\ No newline at end of file