textpattern / textpattern-toolbelt

A collection of tools which help to develop Textpattern CMS.
https://textpattern.com
GNU General Public License v2.0
3 stars 1 forks source link

Clarity on `textpattern/setup` and `textpattern/update` contents #26

Closed petecooper closed 2 years ago

petecooper commented 2 years ago

Ensure the contents of textpattern/setup directory is completely in sync with the textpattern/update scripts.

Need some clarity on this, bit of a head scratcher.

Bloke commented 2 years ago

No problem.

When you install from scratch, Textpattern runs through /setup. It imports content (if you've added anything after market, e.g. a theme) sets up prefs as governed in DB/Core, plus any that are defined within the setup routine itself (new prefs with default values), populates tables, blah blah.

When you upgrade none of that happens. It just runs through the contents of the /update directory and applies whichever patch files are needed to take your system from its current version to the latest. The only bit that's shared between the two entry points is the prefs sync check when you log in.

When we add new features or change things (e.g. alter prefs defaults such as when we turned off logging) we usually remember to do it in both places - /setup and /update - but occasionally we forget. So this one-liner is just a reminder to check, for example, that if we've made a table alteration in an /update script, we also reflect the changes in the .table schema files in vendors/Textpattern/DB/. That way, first-time installers and upgraders get the same net experience.

petecooper commented 2 years ago

Perfect - thanks @Bloke