diff --git a/CHANGELOG.md b/CHANGELOG.md index caec820c4..6aec46eea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,61 +10,66 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). ## [9.4.0] ### Added + - Adds property `bulk_migration_parallelism` for fine-tuning the worker threads number - Adds APIs to bulk import users - - GET `/bulk-import/users` - - POST `/bulk-import/users` - - GET `/bulk-import/users/count` - - POST `/bulk-import/users/remove` - - POST `/bulk-import/users/import` + - GET `/bulk-import/users` + - POST `/bulk-import/users` + - GET `/bulk-import/users/count` + - POST `/bulk-import/users/remove` + - POST `/bulk-import/users/import` - Adds `ProcessBulkImportUsers` cron job to process bulk import users - Adds multithreaded worker support for the `ProcessBulkImportUsers` cron job for faster bulk imports - Adds support for lazy importing users +### Breaking changes + +- Includes CUD in the owner field for OAuth clients + ### Migrations For PostgreSQL, run the following SQL script: + ```sql -"CREATE TABLE IF NOT EXISTS bulk_import_users ( - id CHAR(36), - app_id VARCHAR(64) NOT NULL DEFAULT 'public', - primary_user_id VARCHAR(36), - raw_data TEXT NOT NULL, - status VARCHAR(128) DEFAULT 'NEW', - error_msg TEXT, - created_at BIGINT NOT NULL, - updated_at BIGINT NOT NULL, - CONSTRAINT bulk_import_users_pkey PRIMARY KEY(app_id, id), - CONSTRAINT bulk_import_users__app_id_fkey FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE +CREATE TABLE IF NOT EXISTS bulk_import_users ( + id CHAR(36), + app_id VARCHAR(64) NOT NULL DEFAULT 'public', + primary_user_id VARCHAR(36), + raw_data TEXT NOT NULL, + status VARCHAR(128) DEFAULT 'NEW', + error_msg TEXT, + created_at BIGINT NOT NULL, + updated_at BIGINT NOT NULL, + CONSTRAINT bulk_import_users_pkey PRIMARY KEY(app_id, id), + CONSTRAINT bulk_import_users__app_id_fkey FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE ); CREATE INDEX IF NOT EXISTS bulk_import_users_status_updated_at_index ON bulk_import_users (app_id, status, updated_at); -CREATE INDEX IF NOT EXISTS bulk_import_users_pagination_index1 ON bulk_import_users (app_id, status, created_at DESC, - id DESC); +CREATE INDEX IF NOT EXISTS bulk_import_users_pagination_index1 ON bulk_import_users (app_id, status, created_at DESC, id DESC); CREATE INDEX IF NOT EXISTS bulk_import_users_pagination_index2 ON bulk_import_users (app_id, created_at DESC, id DESC); ``` For MySQL run the following SQL script: + ```sql CREATE TABLE IF NOT EXISTS bulk_import_users ( - id CHAR(36), - app_id VARCHAR(64) NOT NULL DEFAULT 'public', - primary_user_id VARCHAR(36), - raw_data TEXT NOT NULL, - status VARCHAR(128) DEFAULT 'NEW', - error_msg TEXT, - created_at BIGINT UNSIGNED NOT NULL, - updated_at BIGINT UNSIGNED NOT NULL, - PRIMARY KEY (app_id, id), - FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE + id CHAR(36), + app_id VARCHAR(64) NOT NULL DEFAULT 'public', + primary_user_id VARCHAR(36), + raw_data TEXT NOT NULL, + status VARCHAR(128) DEFAULT 'NEW', + error_msg TEXT, + created_at BIGINT UNSIGNED NOT NULL, + updated_at BIGINT UNSIGNED NOT NULL, + PRIMARY KEY (app_id, id), + FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE ); CREATE INDEX bulk_import_users_status_updated_at_index ON bulk_import_users (app_id, status, updated_at); -CREATE INDEX bulk_import_users_pagination_index1 ON bulk_import_users (app_id, status, created_at DESC, - id DESC); +CREATE INDEX bulk_import_users_pagination_index1 ON bulk_import_users (app_id, status, created_at DESC, id DESC); CREATE INDEX bulk_import_users_pagination_index2 ON bulk_import_users (app_id, created_at DESC, id DESC); ``` @@ -72,7 +77,6 @@ CREATE INDEX bulk_import_users_pagination_index2 ON bulk_import_users (app_id, c ## [9.3.1] - Includes exception class name in 500 error message -- Includes CUD in the owner field for OAuth clients ## [9.3.0]