[{"data":1,"prerenderedAt":2122},["ShallowReactive",2],{"navigation_docs_en":3,"-en-tauri-sqlite-orm-core-concepts-migrations":237,"-en-tauri-sqlite-orm-core-concepts-migrations-surround":2117},[4,15,69,122],{"title":5,"icon":6,"path":7,"stem":8,"children":9,"page":14},"Getting Started with Docs","i-lucide-home","/en/getting-started","en/1.getting-started",[10],{"title":11,"path":12,"stem":13,"icon":6},"Introduction","/en/getting-started/introduction","en/1.getting-started/1.introduction",false,{"title":16,"path":17,"stem":18,"children":19,"page":14},"owo-ui Components","/en/owo-ui-components","en/2.owo-ui-components",[20,23],{"title":11,"path":21,"stem":22,"icon":6},"/en/owo-ui-components/introduction","en/2.owo-ui-components/2.introduction",{"title":24,"icon":25,"path":26,"stem":27,"children":28,"page":14},"Components","i-lucide-layout","/en/owo-ui-components/components","en/2.owo-ui-components/3.components",[29,33,37,41,45,49,53,57,61,65],{"title":30,"path":31,"stem":32},"Button","/en/owo-ui-components/components/button","en/2.owo-ui-components/3.components/button",{"title":34,"path":35,"stem":36},"Checkbox","/en/owo-ui-components/components/checkbox","en/2.owo-ui-components/3.components/checkbox",{"title":38,"path":39,"stem":40},"Collapsible Container","/en/owo-ui-components/components/collapsible-container","en/2.owo-ui-components/3.components/collapsible-container",{"title":42,"path":43,"stem":44},"Dropdown","/en/owo-ui-components/components/dropdown","en/2.owo-ui-components/3.components/dropdown",{"title":46,"path":47,"stem":48},"Flow Layout","/en/owo-ui-components/components/flow-layout","en/2.owo-ui-components/3.components/flow-layout",{"title":50,"path":51,"stem":52},"Grid Layout","/en/owo-ui-components/components/grid-layout","en/2.owo-ui-components/3.components/grid-layout",{"title":54,"path":55,"stem":56},"Label","/en/owo-ui-components/components/label","en/2.owo-ui-components/3.components/label",{"title":58,"path":59,"stem":60},"Scroll Container","/en/owo-ui-components/components/scroll-container","en/2.owo-ui-components/3.components/scroll-container",{"title":62,"path":63,"stem":64},"Slider","/en/owo-ui-components/components/slider","en/2.owo-ui-components/3.components/slider",{"title":66,"path":67,"stem":68},"Templates","/en/owo-ui-components/components/templates","en/2.owo-ui-components/3.components/templates",{"title":70,"path":71,"stem":72,"children":73,"page":14},"Nexus","/en/nexus","en/3.nexus",[74,77,82],{"title":11,"path":75,"stem":76,"icon":6},"/en/nexus/introduction","en/3.nexus/2.introduction",{"title":78,"path":79,"stem":80,"icon":81},"Deployment","/en/nexus/deployment","en/3.nexus/3.deployment","i-lucide-rocket",{"title":83,"path":84,"stem":85,"children":86,"page":14},"Endpoints","/en/nexus/endpoints","en/3.nexus/endpoints",[87,91,95,99,102,106,110,114,118],{"title":88,"path":89,"stem":90},"Authentication","/en/nexus/endpoints/authentication","en/3.nexus/endpoints/1.authentication",{"title":92,"path":93,"stem":94},"Rate Limiting","/en/nexus/endpoints/rate-limiting","en/3.nexus/endpoints/2.rate-limiting",{"title":96,"path":97,"stem":98},"Error Handling","/en/nexus/endpoints/error-handling","en/3.nexus/endpoints/3.error-handling",{"title":83,"path":100,"stem":101},"/en/nexus/endpoints/_dir","en/3.nexus/endpoints/_dir",{"title":103,"path":104,"stem":105},"Album","/en/nexus/endpoints/albums","en/3.nexus/endpoints/albums",{"title":107,"path":108,"stem":109},"Blog","/en/nexus/endpoints/blog","en/3.nexus/endpoints/blog",{"title":111,"path":112,"stem":113},"Comments","/en/nexus/endpoints/comments","en/3.nexus/endpoints/comments",{"title":115,"path":116,"stem":117},"File Management","/en/nexus/endpoints/file-management","en/3.nexus/endpoints/file-management",{"title":119,"path":120,"stem":121},"Photo Management","/en/nexus/endpoints/photos","en/3.nexus/endpoints/photos",{"title":123,"icon":124,"path":125,"stem":126,"children":127,"page":14},"Tauri SQLite ORM","i-lucide-database","/en/tauri-sqlite-orm","en/4.tauri-sqlite-orm",[128,132,137,141,162,187,232],{"title":11,"path":129,"stem":130,"icon":131},"/en/tauri-sqlite-orm/introduction","en/4.tauri-sqlite-orm/1.introduction","i-lucide-book-open",{"title":133,"path":134,"stem":135,"icon":136},"Installation & Setup","/en/tauri-sqlite-orm/installation-and-setup","en/4.tauri-sqlite-orm/2.installation-and-setup","i-lucide-download",{"title":138,"path":139,"stem":140,"icon":81},"Your First Schema & Query","/en/tauri-sqlite-orm/your-first-schema-and-query","en/4.tauri-sqlite-orm/3.your-first-schema-and-query",{"title":142,"path":143,"stem":144,"children":145,"page":14},"Core Concepts","/en/tauri-sqlite-orm/core-concepts","en/4.tauri-sqlite-orm/4.core-concepts",[146,150,154,158],{"title":147,"path":148,"stem":149},"Defining Schemas","/en/tauri-sqlite-orm/core-concepts/defining-schemas","en/4.tauri-sqlite-orm/4.core-concepts/1.defining-schemas",{"title":151,"path":152,"stem":153},"Column Types & Modifiers","/en/tauri-sqlite-orm/core-concepts/column-types-and-modifiers","en/4.tauri-sqlite-orm/4.core-concepts/2.column-types-and-modifiers",{"title":155,"path":156,"stem":157},"The ORM Instance","/en/tauri-sqlite-orm/core-concepts/the-orm-instance","en/4.tauri-sqlite-orm/4.core-concepts/3.the-orm-instance",{"title":159,"path":160,"stem":161},"Migrations","/en/tauri-sqlite-orm/core-concepts/migrations","en/4.tauri-sqlite-orm/4.core-concepts/4.migrations",{"title":163,"path":164,"stem":165,"children":166,"page":14},"Querying Data","/en/tauri-sqlite-orm/querying-data","en/4.tauri-sqlite-orm/5.querying-data",[167,171,175,179,183],{"title":168,"path":169,"stem":170},"Select","/en/tauri-sqlite-orm/querying-data/selecting-data","en/4.tauri-sqlite-orm/5.querying-data/1.selecting-data",{"title":172,"path":173,"stem":174},"Insert","/en/tauri-sqlite-orm/querying-data/inserting-data","en/4.tauri-sqlite-orm/5.querying-data/2.inserting-data",{"title":176,"path":177,"stem":178},"Update","/en/tauri-sqlite-orm/querying-data/updating-data","en/4.tauri-sqlite-orm/5.querying-data/3.updating-data",{"title":180,"path":181,"stem":182},"Delete","/en/tauri-sqlite-orm/querying-data/deleting-data","en/4.tauri-sqlite-orm/5.querying-data/4.deleting-data",{"title":184,"path":185,"stem":186},"Conditions & Operators","/en/tauri-sqlite-orm/querying-data/conditions-and-operators","en/4.tauri-sqlite-orm/5.querying-data/5.conditions-and-operators",{"title":188,"path":189,"stem":190,"children":191,"page":14},"Advanced Topics","/en/tauri-sqlite-orm/advanced-topics","en/4.tauri-sqlite-orm/6.advanced-topics",[192,196,200,204,208,212,216,220,224,228],{"title":193,"path":194,"stem":195},"Relations","/en/tauri-sqlite-orm/advanced-topics/working-with-relations","en/4.tauri-sqlite-orm/6.advanced-topics/1.working-with-relations",{"title":197,"path":198,"stem":199},"Error Handling & Safety","/en/tauri-sqlite-orm/advanced-topics/error-handling-and-safety","en/4.tauri-sqlite-orm/6.advanced-topics/10.error-handling-and-safety",{"title":201,"path":202,"stem":203},"Joins","/en/tauri-sqlite-orm/advanced-topics/joins","en/4.tauri-sqlite-orm/6.advanced-topics/2.joins",{"title":205,"path":206,"stem":207},"Transactions","/en/tauri-sqlite-orm/advanced-topics/transactions","en/4.tauri-sqlite-orm/6.advanced-topics/3.transactions",{"title":209,"path":210,"stem":211},"Common Table Expressions","/en/tauri-sqlite-orm/advanced-topics/common-table-expressions","en/4.tauri-sqlite-orm/6.advanced-topics/4.common-table-expressions",{"title":213,"path":214,"stem":215},"Raw SQL","/en/tauri-sqlite-orm/advanced-topics/raw-sql","en/4.tauri-sqlite-orm/6.advanced-topics/5.raw-sql",{"title":217,"path":218,"stem":219},"Type Safety & Inference","/en/tauri-sqlite-orm/advanced-topics/type-safety-and-inference","en/4.tauri-sqlite-orm/6.advanced-topics/6.type-safety-and-inference",{"title":221,"path":222,"stem":223},"Schema Management","/en/tauri-sqlite-orm/advanced-topics/manual-schema-management","en/4.tauri-sqlite-orm/6.advanced-topics/7.manual-schema-management",{"title":225,"path":226,"stem":227},"Query Debugging","/en/tauri-sqlite-orm/advanced-topics/query-debugging","en/4.tauri-sqlite-orm/6.advanced-topics/8.query-debugging",{"title":229,"path":230,"stem":231},"Subqueries & Aggregates","/en/tauri-sqlite-orm/advanced-topics/subqueries-and-aggregates","en/4.tauri-sqlite-orm/6.advanced-topics/9.subqueries-and-aggregates",{"title":233,"path":234,"stem":235,"icon":236},"API Reference","/en/tauri-sqlite-orm/api-reference","en/4.tauri-sqlite-orm/7.api-reference","i-lucide-book",{"id":238,"title":159,"body":239,"description":245,"extension":2111,"links":2112,"meta":2113,"navigation":617,"path":160,"seo":2115,"stem":161,"__hash__":2116},"docs_en/en/4.tauri-sqlite-orm/4.core-concepts/4.migrations.md",{"type":240,"value":241,"toc":2090},"minimark",[242,246,260,265,277,294,298,301,306,309,357,361,364,461,466,480,483,487,490,496,503,525,532,563,569,575,581,912,921,927,930,935,956,961,985,994,1008,1016,1027,1128,1144,1174,1180,1183,1192,1196,1199,1241,1245,1252,1344,1355,1359,1363,1387,1391,1679,1683,1827,1831,1834,1853,2086],[243,244,245],"p",{},"Migrations are the process of keeping your database schema synchronized with your application's schema definitions in code. This ORM provides a powerful migration system that can handle both simple and complex schema changes.",[247,248,251,255,256,259],"callout",{"color":249,"icon":250},"warning","i-lucide-triangle-alert",[252,253,254],"strong",{},"Destructive Migrations Warning:"," Adding or removing UNIQUE constraints, changing column types, or modifying NOT NULL constraints will ",[252,257,258],{},"recreate the entire table",". While data is preserved during recreation, this is a destructive operation that temporarily locks the table. Always backup your database before running such migrations, especially in production.",[261,262,264],"h2",{"id":263},"how-it-works-the-schema-signature","How It Works: The Schema Signature",[243,266,267,268,272,273,276],{},"The ",[269,270,271],"code",{},"migrateIfDirty()"," method relies on a ",[252,274,275],{},"schema signature",".",[278,279,280,284,291],"ol",{},[281,282,283],"li",{},"It computes a unique string based on your current code schema (tables, columns, types, constraints).",[281,285,286,287,290],{},"It compares this signature to one stored in a special ",[269,288,289],{},"_schema_meta"," table in your database.",[281,292,293],{},"If the signatures don't match, the ORM considers the schema \"dirty\" and runs the migration process.",[261,295,297],{"id":296},"migration-strategies","Migration Strategies",[243,299,300],{},"The ORM uses two strategies for migrations:",[302,303,305],"h3",{"id":304},"strategy-1-simple-column-addition-safe-fast","Strategy 1: Simple Column Addition (Safe & Fast)",[243,307,308],{},"Used for adding new nullable columns without constraints:",[310,311,316],"pre",{"className":312,"code":313,"language":314,"meta":315,"style":315},"language-ts shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","// Adding a simple nullable column - uses ALTER TABLE\nuserId: text('userId')\n","ts","",[269,317,318,327],{"__ignoreMap":315},[319,320,323],"span",{"class":321,"line":322},"line",1,[319,324,326],{"class":325},"sHwdD","// Adding a simple nullable column - uses ALTER TABLE\n",[319,328,330,334,338,342,346,349,352,354],{"class":321,"line":329},2,[319,331,333],{"class":332},"sBMFI","userId",[319,335,337],{"class":336},"sMK4o",":",[319,339,341],{"class":340},"s2Zo4"," text",[319,343,345],{"class":344},"sTEyZ","(",[319,347,348],{"class":336},"'",[319,350,333],{"class":351},"sfazB",[319,353,348],{"class":336},[319,355,356],{"class":344},")\n",[302,358,360],{"id":359},"strategy-2-table-recreation-destructive-but-safe","Strategy 2: Table Recreation (Destructive but Safe)",[243,362,363],{},"Used when column definitions change or constraints are added/removed:",[310,365,367],{"className":312,"code":366,"language":314,"meta":315,"style":315},"// These trigger table recreation:\nemail: text('email').unique()    // ← Adding/removing UNIQUE\nage: integer('age')              // ← Changing column type\nname: text('name').notNull()     // ← Adding/removing NOT NULL\n",[269,368,369,374,405,430],{"__ignoreMap":315},[319,370,371],{"class":321,"line":322},[319,372,373],{"class":325},"// These trigger table recreation:\n",[319,375,376,379,381,383,385,387,389,391,394,396,399,402],{"class":321,"line":329},[319,377,378],{"class":332},"email",[319,380,337],{"class":336},[319,382,341],{"class":340},[319,384,345],{"class":344},[319,386,348],{"class":336},[319,388,378],{"class":351},[319,390,348],{"class":336},[319,392,393],{"class":344},")",[319,395,276],{"class":336},[319,397,398],{"class":340},"unique",[319,400,401],{"class":344},"()    ",[319,403,404],{"class":325},"// ← Adding/removing UNIQUE\n",[319,406,408,411,413,416,418,420,422,424,427],{"class":321,"line":407},3,[319,409,410],{"class":332},"age",[319,412,337],{"class":336},[319,414,415],{"class":340}," integer",[319,417,345],{"class":344},[319,419,348],{"class":336},[319,421,410],{"class":351},[319,423,348],{"class":336},[319,425,426],{"class":344},")              ",[319,428,429],{"class":325},"// ← Changing column type\n",[319,431,433,436,438,440,442,444,446,448,450,452,455,458],{"class":321,"line":432},4,[319,434,435],{"class":332},"name",[319,437,337],{"class":336},[319,439,341],{"class":340},[319,441,345],{"class":344},[319,443,348],{"class":336},[319,445,435],{"class":351},[319,447,348],{"class":336},[319,449,393],{"class":344},[319,451,276],{"class":336},[319,453,454],{"class":340},"notNull",[319,456,457],{"class":344},"()     ",[319,459,460],{"class":325},"// ← Adding/removing NOT NULL\n",[243,462,463],{},[252,464,465],{},"Table Recreation Process:",[278,467,468,471,474,477],{},[281,469,470],{},"Creates temporary table with new schema",[281,472,473],{},"Copies all data from old table",[281,475,476],{},"Drops old table",[281,478,479],{},"Renames temporary table to original name",[247,481,482],{"color":249,"icon":250},"Table recreation requires exclusive table access and can be slow for large tables. The table is temporarily unavailable during migration.",[261,484,486],{"id":485},"migration-methods","Migration Methods",[243,488,489],{},"You have four primary methods for managing migrations, each with a different purpose.",[302,491,493],{"id":492},"dbmigrateifdirty",[269,494,495],{},"db.migrateIfDirty()",[243,497,498,499,502],{},"This is the ",[252,500,501],{},"recommended method for development and simple deployments",". It's an all-in-one, non-destructive command that:",[278,504,505,508,511,514],{},[281,506,507],{},"Automatically checks if the schema is dirty using the signature comparison.",[281,509,510],{},"If dirty, it runs the migration logic to add any missing tables or columns.",[281,512,513],{},"After migrating, it updates the stored signature to match the new schema.",[281,515,516,517,520,521,524],{},"It returns a ",[269,518,519],{},"Promise\u003Cboolean>"," which resolves to ",[269,522,523],{},"true"," if a migration was performed.",[243,526,527,528,531],{},"This method will ",[252,529,530],{},"never"," delete tables or columns, making it safe to run on application startup.",[310,533,536],{"className":312,"code":534,"filename":535,"language":314,"meta":315,"style":315},"// Place this in your app's startup logic\nawait db.migrateIfDirty();\n","src/startup.ts",[269,537,538,543],{"__ignoreMap":315},[319,539,540],{"class":321,"line":322},[319,541,542],{"class":325},"// Place this in your app's startup logic\n",[319,544,545,549,552,554,557,560],{"class":321,"line":329},[319,546,548],{"class":547},"s7zQu","await",[319,550,551],{"class":344}," db",[319,553,276],{"class":336},[319,555,556],{"class":340},"migrateIfDirty",[319,558,559],{"class":344},"()",[319,561,562],{"class":336},";\n",[302,564,566],{"id":565},"dbcheckmigration",[269,567,568],{},"db.checkMigration()",[243,570,571,574],{},[252,572,573],{},"NEW",": Preview migration changes before applying them. This method analyzes your schema and database without making any changes.",[243,576,577,578],{},"Returns: ",[269,579,580],{},"Promise\u003C{ safe: boolean; changes: { ... } }>",[310,582,585],{"className":312,"code":583,"filename":584,"language":314,"meta":315,"style":315},"const result = await db.checkMigration();\n\nconsole.log('Is migration safe?', result.safe);\nconsole.log('Tables to create:', result.changes.tablesToCreate);\nconsole.log('Tables to recreate (DESTRUCTIVE):', result.changes.tablesToRecreate);\nconsole.log('Tables to drop:', result.changes.tablesToDrop);\nconsole.log('Columns to add:', result.changes.columnsToAdd);\n\n// Only migrate if safe\nif (result.safe) {\n  await db.migrate();\n} else {\n  console.warn('⚠️ Migration requires table recreation!');\n  console.warn('Tables affected:', result.changes.tablesToRecreate);\n  // Require explicit user confirmation before proceeding\n}\n","src/check.ts",[269,586,587,613,619,651,684,717,750,783,788,794,811,829,841,865,900,906],{"__ignoreMap":315},[319,588,589,593,596,599,602,604,606,609,611],{"class":321,"line":322},[319,590,592],{"class":591},"spNyl","const",[319,594,595],{"class":344}," result ",[319,597,598],{"class":336},"=",[319,600,601],{"class":547}," await",[319,603,551],{"class":344},[319,605,276],{"class":336},[319,607,608],{"class":340},"checkMigration",[319,610,559],{"class":344},[319,612,562],{"class":336},[319,614,615],{"class":321,"line":329},[319,616,618],{"emptyLinePlaceholder":617},true,"\n",[319,620,621,624,626,629,631,633,636,638,641,644,646,649],{"class":321,"line":407},[319,622,623],{"class":344},"console",[319,625,276],{"class":336},[319,627,628],{"class":340},"log",[319,630,345],{"class":344},[319,632,348],{"class":336},[319,634,635],{"class":351},"Is migration safe?",[319,637,348],{"class":336},[319,639,640],{"class":336},",",[319,642,643],{"class":344}," result",[319,645,276],{"class":336},[319,647,648],{"class":344},"safe)",[319,650,562],{"class":336},[319,652,653,655,657,659,661,663,666,668,670,672,674,677,679,682],{"class":321,"line":432},[319,654,623],{"class":344},[319,656,276],{"class":336},[319,658,628],{"class":340},[319,660,345],{"class":344},[319,662,348],{"class":336},[319,664,665],{"class":351},"Tables to create:",[319,667,348],{"class":336},[319,669,640],{"class":336},[319,671,643],{"class":344},[319,673,276],{"class":336},[319,675,676],{"class":344},"changes",[319,678,276],{"class":336},[319,680,681],{"class":344},"tablesToCreate)",[319,683,562],{"class":336},[319,685,687,689,691,693,695,697,700,702,704,706,708,710,712,715],{"class":321,"line":686},5,[319,688,623],{"class":344},[319,690,276],{"class":336},[319,692,628],{"class":340},[319,694,345],{"class":344},[319,696,348],{"class":336},[319,698,699],{"class":351},"Tables to recreate (DESTRUCTIVE):",[319,701,348],{"class":336},[319,703,640],{"class":336},[319,705,643],{"class":344},[319,707,276],{"class":336},[319,709,676],{"class":344},[319,711,276],{"class":336},[319,713,714],{"class":344},"tablesToRecreate)",[319,716,562],{"class":336},[319,718,720,722,724,726,728,730,733,735,737,739,741,743,745,748],{"class":321,"line":719},6,[319,721,623],{"class":344},[319,723,276],{"class":336},[319,725,628],{"class":340},[319,727,345],{"class":344},[319,729,348],{"class":336},[319,731,732],{"class":351},"Tables to drop:",[319,734,348],{"class":336},[319,736,640],{"class":336},[319,738,643],{"class":344},[319,740,276],{"class":336},[319,742,676],{"class":344},[319,744,276],{"class":336},[319,746,747],{"class":344},"tablesToDrop)",[319,749,562],{"class":336},[319,751,753,755,757,759,761,763,766,768,770,772,774,776,778,781],{"class":321,"line":752},7,[319,754,623],{"class":344},[319,756,276],{"class":336},[319,758,628],{"class":340},[319,760,345],{"class":344},[319,762,348],{"class":336},[319,764,765],{"class":351},"Columns to add:",[319,767,348],{"class":336},[319,769,640],{"class":336},[319,771,643],{"class":344},[319,773,276],{"class":336},[319,775,676],{"class":344},[319,777,276],{"class":336},[319,779,780],{"class":344},"columnsToAdd)",[319,782,562],{"class":336},[319,784,786],{"class":321,"line":785},8,[319,787,618],{"emptyLinePlaceholder":617},[319,789,791],{"class":321,"line":790},9,[319,792,793],{"class":325},"// Only migrate if safe\n",[319,795,797,800,803,805,808],{"class":321,"line":796},10,[319,798,799],{"class":547},"if",[319,801,802],{"class":344}," (result",[319,804,276],{"class":336},[319,806,807],{"class":344},"safe) ",[319,809,810],{"class":336},"{\n",[319,812,814,817,819,821,824,827],{"class":321,"line":813},11,[319,815,816],{"class":547},"  await",[319,818,551],{"class":344},[319,820,276],{"class":336},[319,822,823],{"class":340},"migrate",[319,825,559],{"class":826},"swJcz",[319,828,562],{"class":336},[319,830,832,835,838],{"class":321,"line":831},12,[319,833,834],{"class":336},"}",[319,836,837],{"class":547}," else",[319,839,840],{"class":336}," {\n",[319,842,844,847,849,852,854,856,859,861,863],{"class":321,"line":843},13,[319,845,846],{"class":344},"  console",[319,848,276],{"class":336},[319,850,851],{"class":340},"warn",[319,853,345],{"class":826},[319,855,348],{"class":336},[319,857,858],{"class":351},"⚠️ Migration requires table recreation!",[319,860,348],{"class":336},[319,862,393],{"class":826},[319,864,562],{"class":336},[319,866,868,870,872,874,876,878,881,883,885,887,889,891,893,896,898],{"class":321,"line":867},14,[319,869,846],{"class":344},[319,871,276],{"class":336},[319,873,851],{"class":340},[319,875,345],{"class":826},[319,877,348],{"class":336},[319,879,880],{"class":351},"Tables affected:",[319,882,348],{"class":336},[319,884,640],{"class":336},[319,886,643],{"class":344},[319,888,276],{"class":336},[319,890,676],{"class":344},[319,892,276],{"class":336},[319,894,895],{"class":344},"tablesToRecreate",[319,897,393],{"class":826},[319,899,562],{"class":336},[319,901,903],{"class":321,"line":902},15,[319,904,905],{"class":325},"  // Require explicit user confirmation before proceeding\n",[319,907,909],{"class":321,"line":908},16,[319,910,911],{"class":336},"}\n",[247,913,916,917,920],{"color":914,"icon":915},"info","i-lucide-info","Use ",[269,918,919],{},"checkMigration()"," in production to warn users before destructive migrations, or to log changes for audit purposes.",[302,922,924],{"id":923},"dbmigrateoptions",[269,925,926],{},"db.migrate(options?)",[243,928,929],{},"This is the more powerful, underlying migration method. It directly compares your code schema with the database structure and applies changes.",[243,931,932],{},[252,933,934],{},"Options:",[936,937,938,948],"ul",{},[281,939,940,943,944,947],{},[269,941,942],{},"options.performDestructiveActions: boolean"," (default: ",[269,945,946],{},"false",") - Allow dropping tables/columns",[281,949,950,943,953,955],{},[269,951,952],{},"options.dryRun: boolean",[269,954,946],{},") - Preview changes without applying",[243,957,958],{},[252,959,960],{},"Without options (Default Mode):",[936,962,963,970,976,982],{},[281,964,965,966,969],{},"✅ ",[269,967,968],{},"CREATE TABLE"," for any new tables",[281,971,965,972,975],{},[269,973,974],{},"ALTER TABLE ADD COLUMN"," for simple nullable columns",[281,977,965,978,981],{},[252,979,980],{},"Recreates tables"," when column definitions change (UNIQUE, type, NOT NULL, etc.)",[281,983,984],{},"❌ Never drops tables or columns",[243,986,987,990,991],{},[252,988,989],{},"With"," `{ performDestructiveActions: true }` ",[252,992,993],{},"(Destructive Mode):",[936,995,996,999,1005],{},[281,997,998],{},"Performs all actions from Default Mode",[281,1000,965,1001,1004],{},[269,1002,1003],{},"DROP TABLE"," for tables not in schema",[281,1006,1007],{},"✅ Removes columns not in schema (via table recreation)",[243,1009,1010,1012,1013],{},[252,1011,989],{}," `{ dryRun: true }` ",[252,1014,1015],{},"(Preview Mode):",[936,1017,1018,1021,1024],{},[281,1019,1020],{},"Logs planned changes to console",[281,1022,1023],{},"Does NOT apply any changes",[281,1025,1026],{},"Useful for debugging and CI/CD pipelines",[310,1028,1031],{"className":312,"code":1029,"filename":1030,"language":314,"meta":315,"style":315},"// Safe: add new columns/tables, recreate tables for constraint changes\nawait db.migrate();\n\n// Preview changes without applying\nawait db.migrate({ dryRun: true });\n\n// Destructive: also remove extra tables/columns\nawait db.migrate({ performDestructiveActions: true });\n","src/migrate.ts",[269,1032,1033,1038,1052,1056,1061,1092,1096,1101],{"__ignoreMap":315},[319,1034,1035],{"class":321,"line":322},[319,1036,1037],{"class":325},"// Safe: add new columns/tables, recreate tables for constraint changes\n",[319,1039,1040,1042,1044,1046,1048,1050],{"class":321,"line":329},[319,1041,548],{"class":547},[319,1043,551],{"class":344},[319,1045,276],{"class":336},[319,1047,823],{"class":340},[319,1049,559],{"class":344},[319,1051,562],{"class":336},[319,1053,1054],{"class":321,"line":407},[319,1055,618],{"emptyLinePlaceholder":617},[319,1057,1058],{"class":321,"line":432},[319,1059,1060],{"class":325},"// Preview changes without applying\n",[319,1062,1063,1065,1067,1069,1071,1073,1076,1079,1081,1085,1088,1090],{"class":321,"line":686},[319,1064,548],{"class":547},[319,1066,551],{"class":344},[319,1068,276],{"class":336},[319,1070,823],{"class":340},[319,1072,345],{"class":344},[319,1074,1075],{"class":336},"{",[319,1077,1078],{"class":826}," dryRun",[319,1080,337],{"class":336},[319,1082,1084],{"class":1083},"sfNiH"," true",[319,1086,1087],{"class":336}," }",[319,1089,393],{"class":344},[319,1091,562],{"class":336},[319,1093,1094],{"class":321,"line":719},[319,1095,618],{"emptyLinePlaceholder":617},[319,1097,1098],{"class":321,"line":752},[319,1099,1100],{"class":325},"// Destructive: also remove extra tables/columns\n",[319,1102,1103,1105,1107,1109,1111,1113,1115,1118,1120,1122,1124,1126],{"class":321,"line":785},[319,1104,548],{"class":547},[319,1106,551],{"class":344},[319,1108,276],{"class":336},[319,1110,823],{"class":340},[319,1112,345],{"class":344},[319,1114,1075],{"class":336},[319,1116,1117],{"class":826}," performDestructiveActions",[319,1119,337],{"class":336},[319,1121,1084],{"class":1083},[319,1123,1087],{"class":336},[319,1125,393],{"class":344},[319,1127,562],{"class":336},[247,1129,1132,1135,1136,1139,1140,1143],{"color":1130,"icon":1131},"error","i-lucide-circle-alert",[252,1133,1134],{},"You Have Been Warned:"," Destructive mode (",[269,1137,1138],{},"performDestructiveActions: true",") will permanently delete tables and columns not in your schema. This is intended ONLY for controlled scenarios like development database resets. ",[252,1141,1142],{},"NEVER"," use this on application startup in production!",[247,1145,1146,1157,1171],{"color":249,"icon":250},[243,1147,1148,1149,1152,1153,1156],{},"Even in default mode (without ",[269,1150,1151],{},"performDestructiveActions","), migrations will ",[252,1154,1155],{},"recreate tables"," when you:",[936,1158,1159,1162,1165,1168],{},[281,1160,1161],{},"Add or remove UNIQUE constraints",[281,1163,1164],{},"Change column types (e.g., TEXT → INTEGER)",[281,1166,1167],{},"Add or remove NOT NULL constraints",[281,1169,1170],{},"Add or remove PRIMARY KEY",[243,1172,1173],{},"Always backup your database before running migrations that change column definitions!",[302,1175,1177],{"id":1176},"dbisschemadirty",[269,1178,1179],{},"db.isSchemaDirty()",[243,1181,1182],{},"This method checks the schema signature without performing any migrations. It's useful for UI feedback or custom logic.",[243,1184,1185,1188,1189],{},[252,1186,1187],{},"Returns:"," ",[269,1190,1191],{},"Promise\u003C{ dirty: boolean; current: string; stored: string | null }>",[261,1193,1195],{"id":1194},"whats-supported","What's Supported",[243,1197,1198],{},"The migration system now supports:",[936,1200,1201,1204,1207,1213,1218,1223,1228,1231,1236],{},[281,1202,1203],{},"✅ Creating new tables",[281,1205,1206],{},"✅ Adding simple nullable columns (via ALTER TABLE)",[281,1208,965,1209,1212],{},[252,1210,1211],{},"Changing column types"," (via table recreation)",[281,1214,965,1215,1212],{},[252,1216,1217],{},"Adding/removing UNIQUE constraints",[281,1219,965,1220,1212],{},[252,1221,1222],{},"Adding/removing NOT NULL constraints",[281,1224,965,1225,1212],{},[252,1226,1227],{},"Adding/removing PRIMARY KEY",[281,1229,1230],{},"✅ Adding/removing DEFAULT values (via table recreation)",[281,1232,1233,1234,393],{},"✅ Dropping tables (with ",[269,1235,1138],{},[281,1237,1238,1239,393],{},"✅ Dropping columns (with ",[269,1240,1138],{},[261,1242,1244],{"id":1243},"limitations","Limitations",[243,1246,1247,1248,1251],{},"The migrator ",[252,1249,1250],{},"DOES NOT"," support:",[936,1253,1254,1338],{},[281,1255,1256,1257,1260,1261],{},"❌ ",[252,1258,1259],{},"Renaming columns or tables","- Use manual migration helpers:\n",[310,1262,1264],{"className":312,"code":1263,"language":314,"meta":315,"style":315},"await db.renameTable('old_name', 'new_name')\nawait db.renameColumn('table', 'old_col', 'new_col')\n",[269,1265,1266,1298],{"__ignoreMap":315},[319,1267,1268,1270,1272,1274,1277,1279,1281,1284,1286,1288,1291,1294,1296],{"class":321,"line":322},[319,1269,548],{"class":547},[319,1271,551],{"class":344},[319,1273,276],{"class":336},[319,1275,1276],{"class":340},"renameTable",[319,1278,345],{"class":344},[319,1280,348],{"class":336},[319,1282,1283],{"class":351},"old_name",[319,1285,348],{"class":336},[319,1287,640],{"class":336},[319,1289,1290],{"class":336}," '",[319,1292,1293],{"class":351},"new_name",[319,1295,348],{"class":336},[319,1297,356],{"class":344},[319,1299,1300,1302,1304,1306,1309,1311,1313,1316,1318,1320,1322,1325,1327,1329,1331,1334,1336],{"class":321,"line":329},[319,1301,548],{"class":547},[319,1303,551],{"class":344},[319,1305,276],{"class":336},[319,1307,1308],{"class":340},"renameColumn",[319,1310,345],{"class":344},[319,1312,348],{"class":336},[319,1314,1315],{"class":351},"table",[319,1317,348],{"class":336},[319,1319,640],{"class":336},[319,1321,1290],{"class":336},[319,1323,1324],{"class":351},"old_col",[319,1326,348],{"class":336},[319,1328,640],{"class":336},[319,1330,1290],{"class":336},[319,1332,1333],{"class":351},"new_col",[319,1335,348],{"class":336},[319,1337,356],{"class":344},[281,1339,1256,1340,1343],{},[252,1341,1342],{},"Custom migration logic"," - For complex data transformations, write custom SQL",[247,1345,1348,1349,1354],{"color":1346,"icon":1347},"primary","i-lucide-lightbulb","For operations not supported by automatic migrations, use the ",[1350,1351,1353],"a",{"href":1352},"/6.advanced-topics/7.manual-schema-management","Manual Schema Management"," helpers within a custom migration script.",[261,1356,1358],{"id":1357},"best-practices","Best Practices",[302,1360,1362],{"id":1361},"development-workflow","Development Workflow",[310,1364,1367],{"className":312,"code":1365,"filename":1366,"language":314,"meta":315,"style":315},"// Use auto-migration during development\nawait db.migrateIfDirty()\n","src/db.ts",[269,1368,1369,1374],{"__ignoreMap":315},[319,1370,1371],{"class":321,"line":322},[319,1372,1373],{"class":325},"// Use auto-migration during development\n",[319,1375,1376,1378,1380,1382,1384],{"class":321,"line":329},[319,1377,548],{"class":547},[319,1379,551],{"class":344},[319,1381,276],{"class":336},[319,1383,556],{"class":340},[319,1385,1386],{"class":344},"()\n",[302,1388,1390],{"id":1389},"production-workflow","Production Workflow",[310,1392,1394],{"className":312,"code":1393,"filename":1366,"language":314,"meta":315,"style":315},"// Check before migrating\nconst check = await db.checkMigration()\n\nif (!check.safe) {\n  console.warn('⚠️ Migration requires table recreation!')\n  console.warn('Affected tables:', check.changes.tablesToRecreate)\n  \n  // Log to monitoring system\n  await logToMonitoring({\n    event: 'destructive_migration_required',\n    tables: check.changes.tablesToRecreate\n  })\n  \n  // Require explicit approval or rollback\n  const approved = await askUserForConfirmation()\n  if (!approved) {\n    throw new Error('Migration cancelled by user')\n  }\n}\n\n// Backup before migration\nawait backupDatabase()\n\n// Run migration\nawait db.migrate()\n",[269,1395,1396,1401,1420,1424,1443,1461,1493,1498,1503,1514,1531,1549,1556,1560,1565,1583,1600,1623,1629,1634,1639,1645,1655,1660,1666],{"__ignoreMap":315},[319,1397,1398],{"class":321,"line":322},[319,1399,1400],{"class":325},"// Check before migrating\n",[319,1402,1403,1405,1408,1410,1412,1414,1416,1418],{"class":321,"line":329},[319,1404,592],{"class":591},[319,1406,1407],{"class":344}," check ",[319,1409,598],{"class":336},[319,1411,601],{"class":547},[319,1413,551],{"class":344},[319,1415,276],{"class":336},[319,1417,608],{"class":340},[319,1419,1386],{"class":344},[319,1421,1422],{"class":321,"line":407},[319,1423,618],{"emptyLinePlaceholder":617},[319,1425,1426,1428,1431,1434,1437,1439,1441],{"class":321,"line":432},[319,1427,799],{"class":547},[319,1429,1430],{"class":344}," (",[319,1432,1433],{"class":336},"!",[319,1435,1436],{"class":344},"check",[319,1438,276],{"class":336},[319,1440,807],{"class":344},[319,1442,810],{"class":336},[319,1444,1445,1447,1449,1451,1453,1455,1457,1459],{"class":321,"line":686},[319,1446,846],{"class":344},[319,1448,276],{"class":336},[319,1450,851],{"class":340},[319,1452,345],{"class":826},[319,1454,348],{"class":336},[319,1456,858],{"class":351},[319,1458,348],{"class":336},[319,1460,356],{"class":826},[319,1462,1463,1465,1467,1469,1471,1473,1476,1478,1480,1483,1485,1487,1489,1491],{"class":321,"line":719},[319,1464,846],{"class":344},[319,1466,276],{"class":336},[319,1468,851],{"class":340},[319,1470,345],{"class":826},[319,1472,348],{"class":336},[319,1474,1475],{"class":351},"Affected tables:",[319,1477,348],{"class":336},[319,1479,640],{"class":336},[319,1481,1482],{"class":344}," check",[319,1484,276],{"class":336},[319,1486,676],{"class":344},[319,1488,276],{"class":336},[319,1490,895],{"class":344},[319,1492,356],{"class":826},[319,1494,1495],{"class":321,"line":752},[319,1496,1497],{"class":826},"  \n",[319,1499,1500],{"class":321,"line":785},[319,1501,1502],{"class":325},"  // Log to monitoring system\n",[319,1504,1505,1507,1510,1512],{"class":321,"line":790},[319,1506,816],{"class":547},[319,1508,1509],{"class":340}," logToMonitoring",[319,1511,345],{"class":826},[319,1513,810],{"class":336},[319,1515,1516,1519,1521,1523,1526,1528],{"class":321,"line":796},[319,1517,1518],{"class":826},"    event",[319,1520,337],{"class":336},[319,1522,1290],{"class":336},[319,1524,1525],{"class":351},"destructive_migration_required",[319,1527,348],{"class":336},[319,1529,1530],{"class":336},",\n",[319,1532,1533,1536,1538,1540,1542,1544,1546],{"class":321,"line":813},[319,1534,1535],{"class":826},"    tables",[319,1537,337],{"class":336},[319,1539,1482],{"class":344},[319,1541,276],{"class":336},[319,1543,676],{"class":344},[319,1545,276],{"class":336},[319,1547,1548],{"class":344},"tablesToRecreate\n",[319,1550,1551,1554],{"class":321,"line":831},[319,1552,1553],{"class":336},"  }",[319,1555,356],{"class":826},[319,1557,1558],{"class":321,"line":843},[319,1559,1497],{"class":826},[319,1561,1562],{"class":321,"line":867},[319,1563,1564],{"class":325},"  // Require explicit approval or rollback\n",[319,1566,1567,1570,1573,1576,1578,1581],{"class":321,"line":902},[319,1568,1569],{"class":591},"  const",[319,1571,1572],{"class":344}," approved",[319,1574,1575],{"class":336}," =",[319,1577,601],{"class":547},[319,1579,1580],{"class":340}," askUserForConfirmation",[319,1582,1386],{"class":826},[319,1584,1585,1588,1590,1592,1595,1598],{"class":321,"line":908},[319,1586,1587],{"class":547},"  if",[319,1589,1430],{"class":826},[319,1591,1433],{"class":336},[319,1593,1594],{"class":344},"approved",[319,1596,1597],{"class":826},") ",[319,1599,810],{"class":336},[319,1601,1603,1606,1609,1612,1614,1616,1619,1621],{"class":321,"line":1602},17,[319,1604,1605],{"class":547},"    throw",[319,1607,1608],{"class":336}," new",[319,1610,1611],{"class":340}," Error",[319,1613,345],{"class":826},[319,1615,348],{"class":336},[319,1617,1618],{"class":351},"Migration cancelled by user",[319,1620,348],{"class":336},[319,1622,356],{"class":826},[319,1624,1626],{"class":321,"line":1625},18,[319,1627,1628],{"class":336},"  }\n",[319,1630,1632],{"class":321,"line":1631},19,[319,1633,911],{"class":336},[319,1635,1637],{"class":321,"line":1636},20,[319,1638,618],{"emptyLinePlaceholder":617},[319,1640,1642],{"class":321,"line":1641},21,[319,1643,1644],{"class":325},"// Backup before migration\n",[319,1646,1648,1650,1653],{"class":321,"line":1647},22,[319,1649,548],{"class":547},[319,1651,1652],{"class":340}," backupDatabase",[319,1654,1386],{"class":344},[319,1656,1658],{"class":321,"line":1657},23,[319,1659,618],{"emptyLinePlaceholder":617},[319,1661,1663],{"class":321,"line":1662},24,[319,1664,1665],{"class":325},"// Run migration\n",[319,1667,1669,1671,1673,1675,1677],{"class":321,"line":1668},25,[319,1670,548],{"class":547},[319,1672,551],{"class":344},[319,1674,276],{"class":336},[319,1676,823],{"class":340},[319,1678,1386],{"class":344},[302,1680,1682],{"id":1681},"cicd-pipeline","CI/CD Pipeline",[310,1684,1687],{"className":312,"code":1685,"filename":1686,"language":314,"meta":315,"style":315},"// In your CI/CD pipeline, fail if destructive migrations are detected\nconst check = await db.checkMigration()\n\nif (!check.safe) {\n  console.error('❌ Destructive migration detected!')\n  console.error('Tables to recreate:', check.changes.tablesToRecreate)\n  process.exit(1)\n}\n\nconsole.log('✅ Migration is safe')\n","scripts/check-migrations.ts",[269,1688,1689,1694,1712,1716,1732,1751,1782,1800,1804,1808],{"__ignoreMap":315},[319,1690,1691],{"class":321,"line":322},[319,1692,1693],{"class":325},"// In your CI/CD pipeline, fail if destructive migrations are detected\n",[319,1695,1696,1698,1700,1702,1704,1706,1708,1710],{"class":321,"line":329},[319,1697,592],{"class":591},[319,1699,1407],{"class":344},[319,1701,598],{"class":336},[319,1703,601],{"class":547},[319,1705,551],{"class":344},[319,1707,276],{"class":336},[319,1709,608],{"class":340},[319,1711,1386],{"class":344},[319,1713,1714],{"class":321,"line":407},[319,1715,618],{"emptyLinePlaceholder":617},[319,1717,1718,1720,1722,1724,1726,1728,1730],{"class":321,"line":432},[319,1719,799],{"class":547},[319,1721,1430],{"class":344},[319,1723,1433],{"class":336},[319,1725,1436],{"class":344},[319,1727,276],{"class":336},[319,1729,807],{"class":344},[319,1731,810],{"class":336},[319,1733,1734,1736,1738,1740,1742,1744,1747,1749],{"class":321,"line":686},[319,1735,846],{"class":344},[319,1737,276],{"class":336},[319,1739,1130],{"class":340},[319,1741,345],{"class":826},[319,1743,348],{"class":336},[319,1745,1746],{"class":351},"❌ Destructive migration detected!",[319,1748,348],{"class":336},[319,1750,356],{"class":826},[319,1752,1753,1755,1757,1759,1761,1763,1766,1768,1770,1772,1774,1776,1778,1780],{"class":321,"line":719},[319,1754,846],{"class":344},[319,1756,276],{"class":336},[319,1758,1130],{"class":340},[319,1760,345],{"class":826},[319,1762,348],{"class":336},[319,1764,1765],{"class":351},"Tables to recreate:",[319,1767,348],{"class":336},[319,1769,640],{"class":336},[319,1771,1482],{"class":344},[319,1773,276],{"class":336},[319,1775,676],{"class":344},[319,1777,276],{"class":336},[319,1779,895],{"class":344},[319,1781,356],{"class":826},[319,1783,1784,1787,1789,1792,1794,1798],{"class":321,"line":752},[319,1785,1786],{"class":344},"  process",[319,1788,276],{"class":336},[319,1790,1791],{"class":340},"exit",[319,1793,345],{"class":826},[319,1795,1797],{"class":1796},"sbssI","1",[319,1799,356],{"class":826},[319,1801,1802],{"class":321,"line":785},[319,1803,911],{"class":336},[319,1805,1806],{"class":321,"line":790},[319,1807,618],{"emptyLinePlaceholder":617},[319,1809,1810,1812,1814,1816,1818,1820,1823,1825],{"class":321,"line":796},[319,1811,623],{"class":344},[319,1813,276],{"class":336},[319,1815,628],{"class":340},[319,1817,345],{"class":344},[319,1819,348],{"class":336},[319,1821,1822],{"class":351},"✅ Migration is safe",[319,1824,348],{"class":336},[319,1826,356],{"class":344},[302,1828,1830],{"id":1829},"large-production-databases","Large Production Databases",[243,1832,1833],{},"For tables with millions of rows, table recreation can be slow. Consider:",[278,1835,1836,1841,1847],{},[281,1837,1838],{},[252,1839,1840],{},"Schedule during maintenance windows",[281,1842,1843,1846],{},[252,1844,1845],{},"Use read replicas"," during migration",[281,1848,1849,1852],{},[252,1850,1851],{},"Write custom migration scripts"," with batching:",[310,1854,1857],{"className":312,"code":1855,"filename":1856,"language":314,"meta":315,"style":315},"// For very large tables, consider custom batched migrations\nconst batchSize = 10000\nlet offset = 0\n\nwhile (true) {\n  const rows = await db.select(oldTable)\n    .limit(batchSize)\n    .offset(offset)\n    .all()\n  \n  if (rows.length === 0) break\n  \n  await db.insert(newTable).values(rows).execute()\n  offset += batchSize\n  \n  console.log(`Migrated ${offset} rows...`)\n}\n","scripts/custom-migration.ts",[269,1858,1859,1864,1876,1889,1893,1906,1931,1946,1959,1968,1972,1997,2001,2037,2048,2052,2082],{"__ignoreMap":315},[319,1860,1861],{"class":321,"line":322},[319,1862,1863],{"class":325},"// For very large tables, consider custom batched migrations\n",[319,1865,1866,1868,1871,1873],{"class":321,"line":329},[319,1867,592],{"class":591},[319,1869,1870],{"class":344}," batchSize ",[319,1872,598],{"class":336},[319,1874,1875],{"class":1796}," 10000\n",[319,1877,1878,1881,1884,1886],{"class":321,"line":407},[319,1879,1880],{"class":591},"let",[319,1882,1883],{"class":344}," offset ",[319,1885,598],{"class":336},[319,1887,1888],{"class":1796}," 0\n",[319,1890,1891],{"class":321,"line":432},[319,1892,618],{"emptyLinePlaceholder":617},[319,1894,1895,1898,1900,1902,1904],{"class":321,"line":686},[319,1896,1897],{"class":547},"while",[319,1899,1430],{"class":344},[319,1901,523],{"class":1083},[319,1903,1597],{"class":344},[319,1905,810],{"class":336},[319,1907,1908,1910,1913,1915,1917,1919,1921,1924,1926,1929],{"class":321,"line":719},[319,1909,1569],{"class":591},[319,1911,1912],{"class":344}," rows",[319,1914,1575],{"class":336},[319,1916,601],{"class":547},[319,1918,551],{"class":344},[319,1920,276],{"class":336},[319,1922,1923],{"class":340},"select",[319,1925,345],{"class":826},[319,1927,1928],{"class":344},"oldTable",[319,1930,356],{"class":826},[319,1932,1933,1936,1939,1941,1944],{"class":321,"line":752},[319,1934,1935],{"class":336},"    .",[319,1937,1938],{"class":340},"limit",[319,1940,345],{"class":826},[319,1942,1943],{"class":344},"batchSize",[319,1945,356],{"class":826},[319,1947,1948,1950,1953,1955,1957],{"class":321,"line":785},[319,1949,1935],{"class":336},[319,1951,1952],{"class":340},"offset",[319,1954,345],{"class":826},[319,1956,1952],{"class":344},[319,1958,356],{"class":826},[319,1960,1961,1963,1966],{"class":321,"line":790},[319,1962,1935],{"class":336},[319,1964,1965],{"class":340},"all",[319,1967,1386],{"class":826},[319,1969,1970],{"class":321,"line":796},[319,1971,1497],{"class":826},[319,1973,1974,1976,1978,1981,1983,1986,1989,1992,1994],{"class":321,"line":813},[319,1975,1587],{"class":547},[319,1977,1430],{"class":826},[319,1979,1980],{"class":344},"rows",[319,1982,276],{"class":336},[319,1984,1985],{"class":344},"length",[319,1987,1988],{"class":336}," ===",[319,1990,1991],{"class":1796}," 0",[319,1993,1597],{"class":826},[319,1995,1996],{"class":547},"break\n",[319,1998,1999],{"class":321,"line":831},[319,2000,1497],{"class":826},[319,2002,2003,2005,2007,2009,2012,2014,2017,2019,2021,2024,2026,2028,2030,2032,2035],{"class":321,"line":843},[319,2004,816],{"class":547},[319,2006,551],{"class":344},[319,2008,276],{"class":336},[319,2010,2011],{"class":340},"insert",[319,2013,345],{"class":826},[319,2015,2016],{"class":344},"newTable",[319,2018,393],{"class":826},[319,2020,276],{"class":336},[319,2022,2023],{"class":340},"values",[319,2025,345],{"class":826},[319,2027,1980],{"class":344},[319,2029,393],{"class":826},[319,2031,276],{"class":336},[319,2033,2034],{"class":340},"execute",[319,2036,1386],{"class":826},[319,2038,2039,2042,2045],{"class":321,"line":867},[319,2040,2041],{"class":344},"  offset",[319,2043,2044],{"class":336}," +=",[319,2046,2047],{"class":344}," batchSize\n",[319,2049,2050],{"class":321,"line":902},[319,2051,1497],{"class":826},[319,2053,2054,2056,2058,2060,2062,2065,2068,2071,2073,2075,2078,2080],{"class":321,"line":908},[319,2055,846],{"class":344},[319,2057,276],{"class":336},[319,2059,628],{"class":340},[319,2061,345],{"class":826},[319,2063,2064],{"class":336},"`",[319,2066,2067],{"class":351},"Migrated ",[319,2069,2070],{"class":336},"${",[319,2072,1952],{"class":344},[319,2074,834],{"class":336},[319,2076,2077],{"class":351}," rows...",[319,2079,2064],{"class":336},[319,2081,356],{"class":826},[319,2083,2084],{"class":321,"line":1602},[319,2085,911],{"class":336},[2087,2088,2089],"style",{},"html pre.shiki code .sHwdD, html code.shiki .sHwdD{--shiki-light:#90A4AE;--shiki-light-font-style:italic;--shiki-default:#546E7A;--shiki-default-font-style:italic;--shiki-dark:#676E95;--shiki-dark-font-style:italic}html pre.shiki code .sBMFI, html code.shiki .sBMFI{--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B}html pre.shiki code .sMK4o, html code.shiki .sMK4o{--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF}html pre.shiki code .s2Zo4, html code.shiki .s2Zo4{--shiki-light:#6182B8;--shiki-default:#82AAFF;--shiki-dark:#82AAFF}html pre.shiki code .sTEyZ, html code.shiki .sTEyZ{--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8}html pre.shiki code .sfazB, html code.shiki .sfazB{--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .s7zQu, html code.shiki .s7zQu{--shiki-light:#39ADB5;--shiki-light-font-style:italic;--shiki-default:#89DDFF;--shiki-default-font-style:italic;--shiki-dark:#89DDFF;--shiki-dark-font-style:italic}html pre.shiki code .spNyl, html code.shiki .spNyl{--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA}html pre.shiki code .swJcz, html code.shiki .swJcz{--shiki-light:#E53935;--shiki-default:#F07178;--shiki-dark:#F07178}html pre.shiki code .sfNiH, html code.shiki .sfNiH{--shiki-light:#FF5370;--shiki-default:#FF9CAC;--shiki-dark:#FF9CAC}html pre.shiki code .sbssI, html code.shiki .sbssI{--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C}",{"title":315,"searchDepth":329,"depth":329,"links":2091},[2092,2093,2097,2103,2104,2105],{"id":263,"depth":329,"text":264},{"id":296,"depth":329,"text":297,"children":2094},[2095,2096],{"id":304,"depth":407,"text":305},{"id":359,"depth":407,"text":360},{"id":485,"depth":329,"text":486,"children":2098},[2099,2100,2101,2102],{"id":492,"depth":407,"text":495},{"id":565,"depth":407,"text":568},{"id":923,"depth":407,"text":926},{"id":1176,"depth":407,"text":1179},{"id":1194,"depth":329,"text":1195},{"id":1243,"depth":329,"text":1244},{"id":1357,"depth":329,"text":1358,"children":2106},[2107,2108,2109,2110],{"id":1361,"depth":407,"text":1362},{"id":1389,"depth":407,"text":1390},{"id":1681,"depth":407,"text":1682},{"id":1829,"depth":407,"text":1830},"md",null,{"descriptions":2114},"Using Migrations through Tauri SQLite ORM.",{"title":159,"description":245},"UZPNUOAAXhiaYW2k1IFgTS2vpzsIzEIolREBKUiOaLo",[2118,2120],{"title":155,"path":156,"stem":157,"description":2119,"children":-1},"The core of the library.",{"title":168,"path":169,"stem":170,"description":2121,"children":-1},"Selecting data using Tauri SQLite ORM.",1773317302120]