MCPcopy
hub / github.com/directus/directus / isInstalled

Function isInstalled

api/src/database/index.ts:277–284  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

275}
276
277export async function isInstalled(): Promise<boolean> {
278 const inspector = getSchemaInspector();
279
280 // The existence of a directus_collections table alone isn't a "proper" check to see if everything
281 // is installed correctly of course, but it's safe enough to assume that this collection only
282 // exists when Directus is properly installed.
283 return await inspector.hasTable('directus_collections');
284}
285
286export async function validateMigrations(): Promise<boolean> {
287 const database = getDatabase();

Callers 4

createAppFunction · 0.85
loadExtensionsFunction · 0.85
applyFunction · 0.85
bootstrapFunction · 0.85

Calls 2

getSchemaInspectorFunction · 0.85
hasTableMethod · 0.65

Tested by

no test coverage detected