Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 1 addition & 8 deletions src/client/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,14 +294,7 @@ export class Migrations<DataModel extends GenericDataModel> {
// Auto-detect function name for direct CLI/dashboard invocation.
// The component always provides cursor and dryRun when scheduling
// batches, so if either is missing this is a direct invocation.
if (
args.fn ||
args.next ||
args.cursor === undefined ||
args.cursor === "" ||
args.dryRun === undefined ||
args.batchSize === 0
) {
if (!args.oneBatchOnly) {
if (args.cursor === "" || args.batchSize === 0) {
console.warn(
"Running this from the CLI or dashboard? Here's some args to use:",
Expand Down
1 change: 1 addition & 0 deletions src/component/lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ export const migrate = mutation({
cursor: state.cursor,
batchSize,
dryRun,
oneBatchOnly: true,
},
);
updateState(result);
Expand Down
1 change: 1 addition & 0 deletions src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const migrationArgs = {
dryRun: v.optional(v.boolean()),
next: v.optional(v.array(v.string())),
reset: v.optional(v.boolean()),
oneBatchOnly: v.optional(v.boolean()),
};
export type MigrationArgs = ObjectType<typeof migrationArgs>;

Expand Down
Loading