fix(medusa): Ignore categories seeding for sqlite (#3713)
This commit is contained in:
committed by
GitHub
parent
7a3194c313
commit
4488ec6852
5
.changeset/warm-files-fly.md
Normal file
5
.changeset/warm-files-fly.md
Normal file
@@ -0,0 +1,5 @@
|
||||
---
|
||||
"@medusajs/medusa": patch
|
||||
---
|
||||
|
||||
fix(medusa): Category seeding result in non null constraint error
|
||||
@@ -13,8 +13,8 @@ import Logger from "../loaders/logger"
|
||||
import featureFlagLoader from "../loaders/feature-flags"
|
||||
|
||||
import {
|
||||
ProductService,
|
||||
ProductCategoryService,
|
||||
ProductService,
|
||||
ProductVariantService,
|
||||
RegionService,
|
||||
ShippingOptionService,
|
||||
@@ -22,7 +22,6 @@ import {
|
||||
StoreService,
|
||||
UserService,
|
||||
} from "../services"
|
||||
import { ProductCategory } from "../models"
|
||||
import { ConfigModule } from "../types/global"
|
||||
import { CreateProductInput } from "../types/product"
|
||||
import { CreateProductCategoryInput } from "../types/product-category"
|
||||
@@ -234,8 +233,10 @@ const seed = async function ({ directory, migrate, seedFile }: SeedOptions) {
|
||||
}
|
||||
}
|
||||
|
||||
for (const c of categories) {
|
||||
await createProductCategory(c, null)
|
||||
if (dbType !== "sqlite") {
|
||||
for (const c of categories) {
|
||||
await createProductCategory(c, null)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user