nova-page-manager icon indicating copy to clipboard operation
nova-page-manager copied to clipboard

Migrating from Nova 3 version

Open paperscissors opened this issue 2 years ago • 0 comments

Putting this issue here for posterity as well for anyone else that's upgrading from Nova 3 to 4.

Here's the query I used to migrate from the old database table nova_page_manager_pages to the new version used in the latest version of this package:

INSERT INTO pages (name, id, created_at, updated_at, template, parent_id, active, data, slug) select CONCAT('{"en":"', name, '"}'), id, created_at, updated_at, 'MyTemplateName' as template, parent_id, published as active, CONCAT('{"en":', data, '}'), CONCAT('{"en":"', slug, '"}') from nova_page_manager_pages

You'll want to of course create a corresponding new Template with php artisan npm:template {className}.

paperscissors avatar Jun 27 '22 15:06 paperscissors