Add ai_flow_triggers table and ::Ai::FlowTrigger model
What does this MR do and why?
This MR adds the database table for AI Flow Triggers, which will be used to configure and trigger AI workflows based on specific events within GitLab projects.
Database Schema
-
New table:
ai_flow_triggerswith the following columns:-
project_id(bigint, not null, foreign key with cascade delete) -
user_id(bigint, not null, indexed) -
config_path(text, max 255 chars, nullable) - Path to AI flow configuration file -
description(text, max 255 chars, not null) - Human-readable description -
event_types(smallint array, default empty, not null) - Types of events that trigger the flow - Standard timestamps (
created_at,updated_at)
-
Project Integration
- Added
has_many :ai_flow_triggersassociation to the EE Project model
This is extracted from !200193 (closed) and provides the foundational data layer for the AI Flow Triggers feature.
Related issue: https://gitlab.com/gitlab-org/gitlab/-/issues/559051+
Edited by Igor Drozdov