[
https://issues.apache.org/jira/browse/AIRAVATA-3698?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17735463#comment-17735463
]
Marcus Christie edited comment on AIRAVATA-3698 at 6/23/23 9:29 PM:
--------------------------------------------------------------------
This is needed to fix the content_type in the content JSON blobs in the
wagtailcore_revision table when migrating from wagtail 3.0 -> 4.0:
{code:sql}
UPDATE
wagtailcore_revision
SET
content = json_replace(
content,
'$.content_type',
(
SELECT
content_type_id
FROM
wagtailcore_page p
WHERE
p.id = wagtailcore_revision.object_id
)
)
;
{code}
Note: this only works for SQLite. I need to create something similar for
MariaDB as well.
For MariaDB 10.0, the following will work to fix pagerevision content type:
{code:sql}
UPDATE
wagtailcore_pagerevision pro
SET
content_json = (
SELECT
regexp_replace(
content_json,
'"content_type": \\d+',
concat('"content_type": ', p.content_type_id)
) FIXED
FROM
wagtailcore_pagerevision pri
INNER JOIN wagtailcore_page p ON p.id = pri.page_id
where pri.id = pro.id
);
{code}
was (Author: marcuschristie):
This is needed to fix the content_type in the content JSON blobs in the
wagtailcore_revision table when migrating from wagtail 3.0 -> 4.0:
{code:sql}
UPDATE
wagtailcore_revision
SET
content = json_replace(
content,
'$.content_type',
(
SELECT
content_type_id
FROM
wagtailcore_page p
WHERE
p.id = wagtailcore_revision.object_id
)
)
;
{code}
Note: this only works for SQLite. I need to create something similar for
MariaDB as well.
> Add support for Python 3.11
> ---------------------------
>
> Key: AIRAVATA-3698
> URL: https://issues.apache.org/jira/browse/AIRAVATA-3698
> Project: Airavata
> Issue Type: Improvement
> Components: Django Portal
> Reporter: Marcus Christie
> Assignee: Marcus Christie
> Priority: Major
>
> Upgrade Wagtail and Django versions to get Python 3.11 support
--
This message was sent by Atlassian Jira
(v8.20.10#820010)