Skip to content

Commit 7687c4d

Browse files
committed
feat(uc)!: rename data store from use-cases to uc_executions
The former was poorly choosen as it's not a valid identifier
1 parent 0f451f6 commit 7687c4d

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
- Introduce `Initializable.initSync()` : useful for contexts where async is not available (e.g. Cloudflare workers initialization) => To address, simply add the method in the concerned implementations. You can leave it empty, re-use the same logic as your existing `init()` if its core is not async, or copy it and adapt it to make it sync. If you want to forbid its usage, use `throw new NotCallableError<this>('initSync', 'init', 'async-only');`
88
- Introduce `ServerManager.mountSync()` : useful for contexts where async is not available (e.g. Cloudflare workers initialization) => To address, simply add the method in the concerned implementations. You can leave it empty, re-use the same logic as your existing `mount()` if its core is not async, or copy it and adapt it to make it sync. If you want to forbid its usage, use `throw new NotCallableError<this>('mountSync', 'mount', 'async-only');`
9+
- Change `uc_data_store_ucs_dataset_name` default value from `use-cases` to `uc_executions` : if you relied on the default value and want to keep it, explicitly set `uc_data_store_ucs_dataset_name` in your settings. If you want the new name, rename your existing collection to the new name
910

1011
**Added**
1112

dist/esm/uc/impl/CloudflareD1UCDataStore.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ let CloudflareD1UCDataStore = class CloudflareD1UCDataStore {
6363
6464
cat > path_to_target/migrations/001_init.sql <<'EOF'
6565
-- Table Definition
66-
CREATE TABLE IF NOT EXISTS use_cases (
66+
CREATE TABLE IF NOT EXISTS uc_executions (
6767
"aggregateId" uuid NOT NULL,
6868
"appName" varchar(255) NOT NULL,
6969
"createdAt" timestamptz NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -78,10 +78,10 @@ CREATE TABLE IF NOT EXISTS use_cases (
7878
);
7979
8080
-- Indices
81-
CREATE INDEX IF NOT EXISTS use_cases_aggregate_id_index ON use_cases (aggregateId);
82-
CREATE INDEX IF NOT EXISTS use_cases_name_index ON use_cases (name);
83-
CREATE INDEX IF NOT EXISTS use_cases_organization_id_index ON use_cases (organizationId);
84-
CREATE INDEX IF NOT EXISTS use_cases_user_id_index ON use_cases (userId);
81+
CREATE INDEX IF NOT EXISTS uc_executions_aggregate_id_index ON uc_executions (aggregateId);
82+
CREATE INDEX IF NOT EXISTS uc_executions_name_index ON uc_executions (name);
83+
CREATE INDEX IF NOT EXISTS uc_executions_organization_id_index ON uc_executions (organizationId);
84+
CREATE INDEX IF NOT EXISTS uc_executions_user_id_index ON uc_executions (userId);
8585
EOF
8686
8787
pnpm wrangler d1 create my-app-uc-data-store

dist/esm/uc/settings/consts.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
export const UC_DEFAULT_SETTINGS = {
2-
uc_data_store_ucs_dataset_name: 'use-cases',
2+
uc_data_store_ucs_dataset_name: 'uc_executions',
33
uc_disabled_use_cases: [],
44
uc_file_ref_prefix: '$ref:',
55
uc_files_directory_path: 'tmp',

0 commit comments

Comments
 (0)