Migrating/Seeding Page Types

sumentuten - 5 months ago

Hi guys! Been trying out PyroCMS3 for a week now. And I've created my Page Types locally, assigning fields and creating templates for them. And now I have to migrate them to my staging server. What is the best way to do this? Can this be done using the streams platform? How?

Answer

- 5 months ago

You can set these up as a seed in some cases that may be what you want to do - but for migration to stage / remote I usually do this:

  • Mark remote as INSTALLED=false in .env
  • Import DB
  • php artisan streams:compile
  • Mark remote as INSTALLED=true again.

That will effectively push everything up (be sure to upload your file uploads too).

ryanthompson - 5 months ago

You can set these up as a seed in some cases that may be what you want to do - but for migration to stage / remote I usually do this:

  • Mark remote as INSTALLED=false in .env
  • Import DB
  • php artisan streams:compile
  • Mark remote as INSTALLED=true again.

That will effectively push everything up (be sure to upload your file uploads too).

ryanthompson - 5 months ago

We're investigating stashing migrations for everything in the system but.. not entirely sure what that looks like right now.

sumentuten - 5 months ago

Worked smoothly. Thanks for the help!