Skip to content

Commit

Permalink
chore: Update Bot table with auto reset session and inactivity timeou…
Browse files Browse the repository at this point in the history
…t columns
  • Loading branch information
n4ze3m committed Jul 27, 2024
1 parent 26b81a1 commit b6f0089
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.

This file was deleted.

11 changes: 11 additions & 0 deletions server/prisma/migrations/q_29/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-- AlterTable
DO $$
BEGIN
IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'Bot' AND column_name = 'autoResetSession') THEN
ALTER TABLE "Bot" ADD COLUMN "autoResetSession" BOOLEAN NOT NULL DEFAULT false;
END IF;

IF NOT EXISTS (SELECT 1 FROM information_schema.columns WHERE table_name = 'Bot' AND column_name = 'inactivityTimeout') THEN
ALTER TABLE "Bot" ADD COLUMN "inactivityTimeout" INTEGER DEFAULT 3600;
END IF;
END $$;

0 comments on commit b6f0089

Please sign in to comment.