mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) ### Are you introducing any new config? If yes, do you have tests with and without them being set? ### ChangeLog (Refer [Template](../oss/CHANGELOG.md)) ### Description Move bucketAuto to schema 105 ---- #### AI description (iteration 1) #### PR Classification This pull request introduces a schema migration for the `$bucketAuto` aggregation stage, moving its support from schema 104 to schema 105. #### PR Summary The changes update documentation, SQL scripts, and test configuration to reflect the migration of `$bucketAuto` support to the new schema. - `pgmongo/sql/pgmongo--1.104-0--1.105-0.sql`: Added inclusion of the new `$bucketAuto` UDF file for schema 105. - `oss/pg_documentdb/sql/documentdb--0.104-0--0.105-0.sql`: New file added to include `$bucketAuto` support for the updated schema. - `oss/CHANGELOG.md` and release notes files: Updated to move the `$bucketAuto` aggregation stage support from the previous schema version to the new release notes for schema 105. - Several test CSV files under `/gateway/managed/Tests.Integration.Shell.Postgres` were updated to reflect the new schema version. <!-- GitOpsUserAgent=GitOps.Apps.Server.pullrequestcopilot -->
26 lines
913 B
PL/PgSQL
26 lines
913 B
PL/PgSQL
#include "udfs/query/bson_orderby--0.104-0.sql"
|
|
#include "operators/bson_orderby_operators--0.104-0.sql"
|
|
#include "operators/bson_btree_orderby_operators_family--0.104-0.sql"
|
|
#include "schema/bson_orderby_hash_operator_class--0.104-0.sql"
|
|
|
|
#include "udfs/projection/bson_projection--0.104-0.sql"
|
|
#include "udfs/index_mgmt/create_index_background--0.104-0.sql"
|
|
#include "udfs/schema_mgmt/compact--0.104-0.sql"
|
|
|
|
#include "udfs/schema_mgmt/cursor_support--0.104-0.sql"
|
|
|
|
-- Schedule the index build task
|
|
DO LANGUAGE plpgsql $cmd$
|
|
BEGIN
|
|
PERFORM __API_SCHEMA_INTERNAL__.schedule_background_index_build_jobs();
|
|
END;
|
|
$cmd$;
|
|
|
|
DO LANGUAGE plpgsql $cmd$
|
|
BEGIN
|
|
IF NOT EXISTS(SELECT 1 FROM cron.job where jobname = 'documentdb_cursor_cleanup_task') THEN
|
|
PERFORM cron.schedule('documentdb_cursor_cleanup_task', '* * * * *', $$CALL documentdb_api_internal.cursor_directory_cleanup();$$);
|
|
END IF;
|
|
END;
|
|
$cmd$;
|