Skip to content

The complete open source platform to run your entire marketplace. Storefront, vendor panel, admin console, and integrations in one enterprise-grade platform you own.

fix(seller): keep existing lead times when making the column nullable (#1730)

Viktor Holik6237276a1a5e
diff --git a/apps/docs/platform/store/concepts/store-entity.mdx b/apps/docs/platform/store/concepts/store-entity.mdx
index 13157c13c..31a337df5 100644
--- a/apps/docs/platform/store/concepts/store-entity.mdx
+++ b/apps/docs/platform/store/concepts/store-entity.mdx
@@ -62,7 +62,7 @@ You remove professional details with `deleteSellerProfessionalDetailsWorkflow`.
## Fulfillment defaults
-`default_leadtime_to_ship` holds the number of days a store needs before it ships, and defaults to `2`. Vendors can change it on their own store.
+`default_leadtime_to_ship` holds the number of days a store needs before it ships. It's `null` on new stores, which then use the marketplace default from Settings → Marketplace. Vendors can change it on their own store.
## Related
diff --git a/apps/docs/platform/store/reference/data-models.mdx b/apps/docs/platform/store/reference/data-models.mdx
index 56bb13b94..d11c24955 100644
--- a/apps/docs/platform/store/reference/data-models.mdx
+++ b/apps/docs/platform/store/reference/data-models.mdx
@@ -28,7 +28,7 @@ The store account and its public profile. Table `seller`, id prefix `sel`.
| `approved_at` | `dateTime` | Nullable, set on first approval |
| `rejected_at` | `dateTime` | Nullable, set on first suspension |
| `is_premium` | `boolean` | Default `false` |
-| `default_leadtime_to_ship` | `number` | Default `2`, in days |
+| `default_leadtime_to_ship` | `number` | Nullable, in days. Falls back to the marketplace default when `null` |
| `closed_from` | `dateTime` | Nullable, start of a scheduled closure |
| `closed_to` | `dateTime` | Nullable, end of a scheduled closure |
| `closure_note` | `text` | Nullable |
diff --git a/packages/core/src/modules/seller/migrations/Migration20261023000000.ts b/packages/core/src/modules/seller/migrations/Migration20261023000000.ts
index 53e3dfbb2..65d4323e7 100644
--- a/packages/core/src/modules/seller/migrations/Migration20261023000000.ts
+++ b/packages/core/src/modules/seller/migrations/Migration20261023000000.ts
@@ -5,11 +5,6 @@ export class Migration20261023000000 extends Migration {
this.addSql(
`ALTER TABLE "seller" ALTER COLUMN "default_leadtime_to_ship" DROP NOT NULL, ALTER COLUMN "default_leadtime_to_ship" DROP DEFAULT;`,
)
- // No dashboard could set this until now, so 2 is the old column default
- // rather than a seller's choice; clearing it lets the marketplace default apply.
- this.addSql(
- `UPDATE "seller" SET "default_leadtime_to_ship" = NULL WHERE "default_leadtime_to_ship" = 2;`,
- )
}
override async down(): Promise<void> {