@momentumcms/core 0.5.5 → 0.5.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/lib/config.d.ts +7 -1
package/package.json
CHANGED
package/src/lib/config.d.ts
CHANGED
|
@@ -41,9 +41,15 @@ export interface DatabaseAdapter {
|
|
|
41
41
|
* @returns The restored document
|
|
42
42
|
*/
|
|
43
43
|
restore?(collection: string, id: string, field?: string): Promise<Record<string, unknown>>;
|
|
44
|
+
/**
|
|
45
|
+
* Register collection metadata (e.g., slug → table name mappings).
|
|
46
|
+
* Always called during server init, even when schema sync is disabled.
|
|
47
|
+
* This ensures CRUD operations resolve the correct table names.
|
|
48
|
+
*/
|
|
49
|
+
registerCollections?(collections: CollectionConfig[]): void;
|
|
44
50
|
/**
|
|
45
51
|
* Initialize database schema based on collections.
|
|
46
|
-
* Called once when the server starts.
|
|
52
|
+
* Called once when the server starts (only when schema sync is enabled).
|
|
47
53
|
*/
|
|
48
54
|
initialize?(collections: CollectionConfig[]): Promise<void>;
|
|
49
55
|
/**
|