Fully Managed
LifeCycle.FULLY_MANAGED is the default behavior where MooseStack has complete control over your database resources. When you change your data models, MooseStack will automatically:
- Add new columns or tables
- Remove columns or tables that no longer exist in your code
- Modify existing column types and constraints
Warning
This mode can perform destructive operations. Data may be lost if you remove fields from your data models or if you perform operations that require a destroy and recreate to be effective, like changing the order_by_fields (Python) or orderByFields (TypeScript) field.
Examples
FullyManagedExample.ts
import { OlapTable, LifeCycle } from "@514labs/moose-lib"; interface UserData { id: string; name: string; email: string;} // Default behavior - fully managedconst userTable = new OlapTable<UserData>("users"); // Explicit fully managed configurationconst explicitTable = new OlapTable<UserData>("users", { orderByFields: ["id"], lifeCycle: LifeCycle.FULLY_MANAGED});