mirror of
https://github.com/FerretDB/documentdb.git
synced 2026-11-25 19:59:54 -05:00
### Does this PR have any customer impact? No ### Type (Feature, Refactoring, Bugfix, DevOps, Testing, Perf, etc) Refactor ### Does it involve schema level changes? (Table, Column, Index, UDF, etc level changes) Yes ### Are you introducing any new config? If yes, do you have tests with and without them being set? No ### Release Note (Refer [Template](../docs/release_notes/pgmongo_template.md)) ### Description Prep for porting backend distributed tests ---- #### AI description (iteration 1) #### PR Classification Code cleanup and preparation for porting backend distributed tests. #### PR Summary This pull request removes obsolete code and prepares the codebase for porting backend distributed tests. - Deleted `cluster_operations.c` and `version_utils.c` from `pgmongo/src`. - Added new functions and triggers in `helio_distributed_test_helpers.sql` and `helio_distributed_test_helpers.out` for testing. - Updated `cluster_operations.c` in `pg_helio_distributed` to include new cluster management functions. - Added new SQL files for cluster operations and version utilities in `pg_helio_distributed`. - Modified `pgmongo.c` to set up global variables for distributed functions and index build queue table creation.
17 lines
616 B
SQL
17 lines
616 B
SQL
|
|
CREATE SCHEMA helio_api_distributed;
|
|
GRANT USAGE ON SCHEMA helio_api_distributed TO helio_admin_role;
|
|
GRANT USAGE ON SCHEMA helio_api_distributed TO helio_readonly_role;
|
|
SET search_path TO helio_api_distributed;
|
|
CREATE TABLE helio_api_distributed.helio_cluster_data
|
|
(
|
|
metadata helio_core.bson
|
|
);
|
|
-- seed the table with a baseline version.
|
|
INSERT INTO helio_api_distributed.helio_cluster_data (metadata) VALUES ( '{ "last_deploy_version": "1.0-0" }'::helio_core.bson );
|
|
|
|
#include "udfs/clustermgmt/cluster_operations--1.21-0.sql"
|
|
#include "udfs/clustermgmt/cluster_version_utils--1.21-0.sql"
|
|
|
|
RESET search_path;
|