Skip to content

Add embedding columns for tasks and tickets#160

Open
dolliecoder wants to merge 2 commits intoAOSSIE-Org:mainfrom
dolliecoder:feat/task-ticket-embedding-schema-v2
Open

Add embedding columns for tasks and tickets#160
dolliecoder wants to merge 2 commits intoAOSSIE-Org:mainfrom
dolliecoder:feat/task-ticket-embedding-schema-v2

Conversation

@dolliecoder
Copy link

@dolliecoder dolliecoder commented Feb 8, 2026

This PR adds embedding columns for task and ticket descriptions as a schema-only, foundational step toward RAG support.

What changed :

Added a nullable description_embedding vector column to:
tasks
tickets
Vector dimensions match the existing meeting embeddings for consistency.

Before :

Tasks and tickets had no schema support for storing embeddings.
Future semantic search or RAG work for these entities was blocked at the database layer.

After :

Tasks and tickets can now store vector embeddings.
No existing behavior, queries, or APIs are affected.

Why this is safe:

Schema-only change (no triggers, no generation logic).
Nullable columns with no runtime usage.
No behavioral or AI-pipeline changes.
Fully reversible.

Context :

This PR is a small, incremental step toward Issue #65.
Follow-up PRs will handle vector search and embedding generation separately to keep reviews focused and low-risk.

Summary by CodeRabbit

  • Chores
    • Added embedding vector columns to tasks and tickets to support advanced search and semantic capabilities.
    • Enabled vector support in the database to allow storage and querying of embeddings.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 8, 2026

📝 Walkthrough

Walkthrough

Adds Postgres vector extension and adds description_embedding vector(768) columns to the tasks and tickets tables to store 768-dimensional description embeddings.

Changes

Cohort / File(s) Summary
DB Extensions
sqls/01_user_auth_schema.sql
Adds CREATE EXTENSION IF NOT EXISTS vector; (keeps existing uuid-ossp extension).
Vector Embedding Columns
sqls/03_task_schema.sql, sqls/04_tickets_schema.sql
Added description_embedding vector(768) column to tasks and tickets tables respectively.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐇 I nibble at schemas in moonlit night,
New vectors tucked in rows so tight,
Seven-sixty-eight whispers, soft and keen,
Tasks and tickets dreaming in-between,
Hop, hum, embed — 🎶 a rabbit's delight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: adding embedding columns to tasks and tickets tables, which is reflected in all three modified schema files.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉

🧹 Recent nitpick comments
sqls/01_user_auth_schema.sql (1)

1-4: Consider adding an inline comment for the vector extension.

Line 1's comment only describes uuid-ossp. A brief comment for the vector extension (e.g., its purpose for embedding columns) would keep things consistent and help future readers understand why it's here.

 -- Installs uuid-ossp extension for UUID generation
 CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
+-- Installs pgvector extension for vector/embedding column support
 CREATE EXTENSION IF NOT EXISTS vector;

Otherwise, the change is correct — IF NOT EXISTS makes it idempotent, and placing it in this file ensures the type is available before the downstream vector(768) columns in 03_task_schema.sql and 04_tickets_schema.sql.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Fix all issues with AI agents
In `@sqls/04_tickets_schema.sql`:
- Line 7: The tickets schema migration uses the pgvector type via the
description_embedding column (vector(768)) before the extension is created; add
a CREATE EXTENSION IF NOT EXISTS vector; statement to an earlier migration or
directly at the top of 04_tickets_schema.sql (before any CREATE TABLE that
references vector) so the vector type exists when description_embedding is
declared, and remove or keep idempotent the later CREATE EXTENSION in
09_meeting_vector_search.sql to avoid ordering failures.

@dolliecoder
Copy link
Author

moved pgvector extension creation to an early shared schema so vector types are available before task/ticket tables are defined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant