Skip to main content

rmDataStoreById

Callable

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

  • 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.

    @example
    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');