* Introduce project_personas table with foreign keys to projects and agent_personas * Add project_skills table with foreign key to projects and agent_skills * Include override boolean field in agent_persona_skills and project_skills * Update schema and migration files to reflect new tables and fields * Enhance CORS handling to reflect request origin
This commit is contained in:
@@ -43,6 +43,7 @@ Table agent_persona_skills {
|
||||
id bigserial [pk]
|
||||
persona_id bigint [not null, ref: > agent_personas.id]
|
||||
skill_id bigint [not null, ref: > agent_skills.id]
|
||||
override boolean [not null, default: false]
|
||||
|
||||
indexes {
|
||||
(persona_id, skill_id) [uk]
|
||||
@@ -50,6 +51,19 @@ Table agent_persona_skills {
|
||||
}
|
||||
}
|
||||
|
||||
Table project_personas {
|
||||
id bigserial [pk]
|
||||
project_id bigint [not null, ref: > projects.id]
|
||||
persona_id bigint [not null, ref: > agent_personas.id]
|
||||
is_default boolean [not null, default: false]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
(project_id, persona_id) [uk]
|
||||
project_id
|
||||
}
|
||||
}
|
||||
|
||||
Table agent_persona_guardrails {
|
||||
id bigserial [pk]
|
||||
persona_id bigint [not null, ref: > agent_personas.id]
|
||||
@@ -124,6 +138,8 @@ Ref: agent_persona_parts.persona_id > agent_personas.id [delete: cascade]
|
||||
Ref: agent_persona_parts.part_id > agent_parts.id [delete: cascade]
|
||||
Ref: agent_persona_skills.persona_id > agent_personas.id [delete: cascade]
|
||||
Ref: agent_persona_skills.skill_id > agent_skills.id [delete: cascade]
|
||||
Ref: project_personas.project_id > projects.id [delete: cascade]
|
||||
Ref: project_personas.persona_id > agent_personas.id [delete: cascade]
|
||||
Ref: agent_persona_guardrails.persona_id > agent_personas.id [delete: cascade]
|
||||
Ref: agent_persona_guardrails.guardrail_id > agent_guardrails.id [delete: cascade]
|
||||
Ref: agent_persona_traits.persona_id > agent_personas.id [delete: cascade]
|
||||
|
||||
@@ -29,6 +29,7 @@ Table project_skills {
|
||||
id bigserial [pk]
|
||||
project_id bigint [not null, ref: > projects.id]
|
||||
skill_id bigint [not null, ref: > agent_skills.id]
|
||||
override boolean [not null, default: false]
|
||||
created_at timestamptz [not null, default: `now()`]
|
||||
|
||||
indexes {
|
||||
|
||||
Reference in New Issue
Block a user