createCacheTableSql
createCacheTableSql(
table?):string
Defined in: packages/ddd-mikro-orm/src/cache/cache-entry.ts:45
SQL that creates the MikroOrmCache table and its expiry index, for
PostgreSQL and SQLite. Run it once in a migration. It matches
createCacheEntrySchema for the same table.
It returns two statements, separated by ;. The table name is validated as a
plain SQL identifier, because it is interpolated, not parameterized.
Parameters
Section titled “Parameters”table?
Section titled “table?”string = 'cache'
Table name, optionally schema-qualified. Default 'cache'.
Returns
Section titled “Returns”string
Example
Section titled “Example”await orm.em.getConnection().execute(createCacheTableSql());