Skip to content

Commit

Permalink
use uuid type for id
Browse files Browse the repository at this point in the history
  • Loading branch information
Yougigun committed May 30, 2024
1 parent defdf7f commit 6242e7d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/db/migration/000002_create_knowledge_base_table.up.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
CREATE TABLE knowledge_base (
id SERIAL PRIMARY KEY,
id UUID PRIMARY KEY NOT NULL DEFAULT gen_random_uuid(),
kb_id VARCHAR(255) NOT NULL UNIQUE,
name VARCHAR(255) NOT NULL,
description VARCHAR(1023),
Expand All @@ -11,7 +11,7 @@ CREATE TABLE knowledge_base (
);

COMMENT ON TABLE knowledge_base IS 'Table to store knowledge base information';
COMMENT ON COLUMN knowledge_base.id IS 'Primary key, auto-incrementing';
COMMENT ON COLUMN knowledge_base.id IS 'Primary key, auto-generated UUID';
COMMENT ON COLUMN knowledge_base.name IS 'Name of the knowledge base, up to 255 characters';
COMMENT ON COLUMN knowledge_base.kb_id IS 'Unique identifier for the knowledge base, up to 255 characters';
COMMENT ON COLUMN knowledge_base.description IS 'Description of the knowledge base, up to 1023 characters';
Expand Down

0 comments on commit 6242e7d

Please sign in to comment.