britto icon indicating copy to clipboard operation
britto copied to clipboard

Migrations

Open jonathanKingston opened this issue 12 years ago • 2 comments

When moving to a new version we need to make sure any change we do doesn't impact old blogs.

So this means upon startup for example we need to check for posts with no publish time and date and add them in.

jonathanKingston avatar May 29 '12 19:05 jonathanKingston

thats a good idea, maybe every plugin should have a startup function too, checking for its collections to exist and if not doing basically the same as at activate except activating?

jaeh avatar May 30 '12 01:05 jaeh

That is what the activate method is for, I have called it install now. Upon installing a plugin you will add to the installed collection and also call the plugins install function if it has one. So inside there it can call these types of methods if it is needed.

jonathanKingston avatar May 30 '12 02:05 jonathanKingston