- Updated python_coding_microproject.csv to use NVIDIA NIM Kimi K2 - Updated kali_linux_shell_simulator.csv to use NVIDIA NIM Kimi K2 - Made more general-purpose (flexible targets, expanded tools) - Added nemotron-mini-agent.csv for fast local inference via Ollama - Added nemotron-agent.csv for advanced reasoning via Ollama - Added wiki page: Projects for NVIDIA NIMs and Nemotron
35 lines
1.4 KiB
SQL
35 lines
1.4 KiB
SQL
-- Migration: Add invitation status tracking to team_memberships
|
|
-- Created: 2025-01-07
|
|
-- Purpose: Enable team invitation accept/decline workflow
|
|
|
|
SET search_path TO tenant_test_company, public;
|
|
|
|
-- Add status tracking columns
|
|
ALTER TABLE team_memberships
|
|
ADD COLUMN IF NOT EXISTS status VARCHAR(20) DEFAULT 'accepted'
|
|
CHECK (status IN ('pending', 'accepted', 'declined'));
|
|
|
|
ALTER TABLE team_memberships
|
|
ADD COLUMN IF NOT EXISTS invited_at TIMESTAMPTZ DEFAULT NOW();
|
|
|
|
ALTER TABLE team_memberships
|
|
ADD COLUMN IF NOT EXISTS responded_at TIMESTAMPTZ;
|
|
|
|
-- Update existing memberships to 'accepted' status
|
|
-- This ensures backward compatibility with existing data
|
|
UPDATE team_memberships
|
|
SET status = 'accepted', invited_at = created_at
|
|
WHERE status IS NULL;
|
|
|
|
-- Create index for efficient pending invitation queries
|
|
CREATE INDEX IF NOT EXISTS idx_team_memberships_status
|
|
ON team_memberships(user_id, status);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_team_memberships_team_status
|
|
ON team_memberships(team_id, status);
|
|
|
|
-- Add comment for documentation
|
|
COMMENT ON COLUMN team_memberships.status IS 'Invitation status: pending (invited), accepted (active member), declined (rejected invitation)';
|
|
COMMENT ON COLUMN team_memberships.invited_at IS 'Timestamp when invitation was sent';
|
|
COMMENT ON COLUMN team_memberships.responded_at IS 'Timestamp when invitation was accepted or declined';
|