Add AI ActiveContext collection table

What does this MR do and why?

Adds a new table for keeping a record of collections created by the ActiveContext gem. The table has the following structure:

                                            Table "public.ai_active_context_collections"
        Column        |           Type           | Collation | Nullable |                          Default
----------------------+--------------------------+-----------+----------+-----------------------------------------------------------
 id                   | bigint                   |           | not null | nextval('ai_active_context_collections_id_seq'::regclass)
 name                 | text                     |           | not null |
 metadata             | jsonb                    |           | not null | '{}'::jsonb
 number_of_partitions | integer                  |           | not null | 1
 created_at           | timestamp with time zone |           | not null |
 updated_at           | timestamp with time zone |           | not null |
Indexes:
    "ai_active_context_collections_pkey" PRIMARY KEY, btree (id)
Check constraints:
    "check_fe84a77f95" CHECK (char_length(name) <= 255)

We will create a record when a collection is created in #517932 (closed). This MR only creates the relation.

An example record looks like:

id: 1, name: "MergeRequest", metadata: {}, number_of_partitions: 3

References

Please include cross links to any resources that are relevant to this MR. This will give reviewers and future readers helpful context to give an efficient review of the changes introduced.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Related to #517046 (closed)

Edited by Madelein van Niekerk

Merge request reports

Loading