mirror of
https://github.com/strapi/strapi.git
synced 2025-11-11 07:39:16 +00:00
feat: expose persistTables
This commit is contained in:
parent
a5664e37b9
commit
fc9148278d
@ -127,15 +127,17 @@ const removePersistedTablesWithSuffix = async (tableNameSuffix) => {
|
|||||||
await removePersistedTables({ strapi }, tableNames);
|
await removePersistedTables({ strapi }, tableNames);
|
||||||
};
|
};
|
||||||
|
|
||||||
const persistTable = async (tableName, dependsOn) => {
|
/**
|
||||||
await addPersistTables({ strapi }, [
|
* Add tables to the reserved tables in core store
|
||||||
{ name: tableName, dependsOn: dependsOn?.map((depTableName) => ({ name: depTableName })) },
|
* @param {Array<string|{ table: string; dependsOn?: Array<{ table: string;}> }} tables
|
||||||
]);
|
*/
|
||||||
|
const persistTables = async (tables) => {
|
||||||
|
await addPersistTables({ strapi }, tables);
|
||||||
};
|
};
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
persistTablesWithPrefix,
|
persistTablesWithPrefix,
|
||||||
removePersistedTablesWithSuffix,
|
removePersistedTablesWithSuffix,
|
||||||
persistTable,
|
persistTables,
|
||||||
findTables,
|
findTables,
|
||||||
};
|
};
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user