File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -258,9 +258,9 @@ export async function createTable(
258258 // Stamp stable ids so the table is id-keyed from its first row write.
259259 const schema = withGeneratedColumnIds ( data . schema )
260260
261- // Row limits are enforced per-write against the current plan (see assertRowCapacity);
262- // the stored column is no longer the source of truth , so it just takes the default.
263- const maxRows = TABLE_LIMITS . MAX_ROWS_PER_TABLE
261+ // Row limits are enforced per-write against the current plan (see assertRowCapacity); the stored
262+ // column is vestigial , so it just takes the caller's value (if any) or the default.
263+ const maxRows = data . maxRows ?? TABLE_LIMITS . MAX_ROWS_PER_TABLE
264264 const maxTables = data . maxTables ?? TABLE_LIMITS . MAX_TABLES_PER_WORKSPACE
265265
266266 const newTable = {
Original file line number Diff line number Diff line change @@ -433,6 +433,9 @@ export interface CreateTableData {
433433 schema : TableSchema
434434 workspaceId : string
435435 userId : string
436+ /** Optional stored row cap. Vestigial under plan-based enforcement (the column is no longer
437+ * consulted on insert), but retained so callers that still set it type-check. */
438+ maxRows ?: number
436439 /** Optional max tables override based on billing plan. Defaults to TABLE_LIMITS.MAX_TABLES_PER_WORKSPACE. */
437440 maxTables ?: number
438441 /** Number of empty rows to create with the table. Defaults to 0. */
You can’t perform that action at this time.
0 commit comments