Skip to main content

Function: rmDataStoreById()

rmDataStoreById(directory): (id, version?, persistFiles?) => Promise<void>

Defined in: data-stores.ts:104

Delete an data store (e.g. database, cache, etc.) by its id.

Optionally specify a version to delete a specific version of the data store.

Parameters

ParameterType
directorystring

Returns

Function

Parameters

ParameterType
idstring
version?string
persistFiles?boolean

Returns

Promise<void>

Examples

import utils from '@eventcatalog/utils';

const { rmDataStoreById } = utils('/path/to/eventcatalog');

// deletes the latest orders-db data store
await rmDataStoreById('orders-db');

// deletes a specific version of the orders-db data store
await rmDataStoreById('orders-db', '0.0.1');
import utils from '@eventcatalog/utils';

const { rmContainerById } = utils('/path/to/eventcatalog');

// deletes the latest orders-db container
await rmContainerById('orders-db');

// deletes a specific version of the orders-db container
await rmContainerById('orders-db', '0.0.1');