FiveonefourFiveonefour
Fiveonefour Docs
MooseStackTemplatesGuides
Release Notes
Source514
  1. MooseStack
  2. Moose Migrate
  3. Fully Managed Lifecycle

On this page

Examples

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});
FullyManagedExample.py
from moose_lib import OlapTable, OlapConfig, LifeCyclefrom pydantic import BaseModel class UserData(BaseModel):    id: str    name: str    email: str # Default behavior - fully manageduser_table = OlapTable[UserData]("users") # Explicit fully managed configurationexplicit_table = OlapTable[UserData]("users", OlapConfig(    order_by_fields=["id"],    life_cycle=LifeCycle.FULLY_MANAGED))
  • Overview
Build a New App
  • 5 Minute Quickstart
  • Browse Templates
  • Existing ClickHouse
Add to Existing App
  • Next.js
  • Fastify
Fundamentals
  • Moose Runtime
  • MooseDev MCP
  • Data Modeling
Moose Modules
  • Moose OLAP
  • Moose Streaming
  • Moose Workflows
  • Moose APIs & Web Apps
Deployment & Lifecycle
  • Moose Migrate
    • Migration Modes
    • Automatic Migrations
    • Planned Migrations
    • Plan Reference
    • Executing Migrations
    • moose migrate (CLI)
    • moose prod (Runtime)
    • Lifecycle Management
    • Fully Managed
    • Deletion Protected
    • Externally Managed
    • Advanced Topics
    • Failed Migrations
  • Moose Deploy
Reference
  • API Reference
  • Data Types
  • Table Engines
  • CLI
  • Configuration
  • Observability Metrics
  • Help
  • Release Notes
Contribution
  • Documentation
  • Framework