mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
refactor: cleanup sql migration
This commit is contained in:
parent
bbf32a841a
commit
46285f9bdc
6 changed files with 1 additions and 21 deletions
|
|
@ -1,2 +0,0 @@
|
|||
-- This is an empty migration.
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
-- Migrate submitted_by_user_id and submitted_by_email into guardrail_info JSON, then drop columns
|
||||
UPDATE "LiteLLM_GuardrailsTable"
|
||||
SET guardrail_info = COALESCE(guardrail_info, '{}'::jsonb) || jsonb_build_object(
|
||||
'submitted_by_user_id', "submitted_by_user_id",
|
||||
'submitted_by_email', "submitted_by_email"
|
||||
);
|
||||
|
||||
-- AlterTable
|
||||
ALTER TABLE "LiteLLM_GuardrailsTable" DROP COLUMN "submitted_by_user_id";
|
||||
ALTER TABLE "LiteLLM_GuardrailsTable" DROP COLUMN "submitted_by_email";
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
-- This is an empty migration.
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
-- This is an empty migration.
|
||||
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
-- This is an empty migration.
|
||||
|
||||
|
|
@ -1,9 +1,7 @@
|
|||
-- AlterTable
|
||||
ALTER TABLE "LiteLLM_GuardrailsTable" ADD COLUMN "reviewed_at" TIMESTAMP(3),
|
||||
ADD COLUMN "status" TEXT NOT NULL DEFAULT 'active',
|
||||
ADD COLUMN "submitted_at" TIMESTAMP(3),
|
||||
ADD COLUMN "submitted_by_email" TEXT,
|
||||
ADD COLUMN "submitted_by_user_id" TEXT;
|
||||
ADD COLUMN "submitted_at" TIMESTAMP(3);
|
||||
|
||||
-- CreateIndex
|
||||
CREATE INDEX "LiteLLM_GuardrailsTable_status_idx" ON "LiteLLM_GuardrailsTable"("status");
|
||||
Loading…
Add table
Reference in a new issue