mirror of
https://github.com/strapi/strapi.git
synced 2025-07-31 21:09:39 +00:00
Merge branch 'releases/v4' into v4/ds-migration
This commit is contained in:
commit
9807c78cb7
@ -20,8 +20,8 @@ const enableDraftAndPublish = async ({ oldContentTypes, contentTypes }) => {
|
|||||||
if (!hasDraftAndPublish(oldContentType) && hasDraftAndPublish(contentType)) {
|
if (!hasDraftAndPublish(oldContentType) && hasDraftAndPublish(contentType)) {
|
||||||
const qb = strapi.db.queryBuilder(uid);
|
const qb = strapi.db.queryBuilder(uid);
|
||||||
await qb
|
await qb
|
||||||
.update({ publishedAt: qb.ref('createdAt') })
|
.update({ published_at: qb.ref('created_at') })
|
||||||
.where({ publishedAt: null })
|
.where({ published_at: null })
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -45,7 +45,7 @@ const disableDraftAndPublish = async ({ oldContentTypes, contentTypes }) => {
|
|||||||
await strapi.db
|
await strapi.db
|
||||||
.queryBuilder(uid)
|
.queryBuilder(uid)
|
||||||
.delete()
|
.delete()
|
||||||
.where({ publishedAt: null })
|
.where({ published_at: null })
|
||||||
.execute();
|
.execute();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user