Changing way, who upgrade scripts are stored

6 views
Skip to first unread message

Alexander Obuhovich

unread,
Jun 1, 2012, 8:40:25 AM6/1/12
to In-Portal Development
Right now In-Portal has upgrades.php and upgrades.sql files in each module, that can be upgraded.
Over time we got a lot of code there that is only executed once, but distracts attention from actual last upgrade script code that needs to be written.

I'm proposing, that we return to upgrade script storage system, like it was in 4.2.0 and earlier versions of In-Portal: one file per version:
  • upgrade_5.2.0-B3.sql and  upgrade_5.2.0-B3.php and so on
Using php build-in function "version_compare" we can easily sort these files. But this time let's place these files in install folder sub-folder and not in install folder itself, like it was done in 4.2.0 and before.


--
Best Regards,

http://www.in-portal.com
http://www.alex-time.com

Dmitry A.

unread,
Jun 1, 2012, 7:49:15 PM6/1/12
to in-por...@googlegroups.com
Hi Alex,

I like the idea and ready to support this.

The only down side is that we might need to have some sort of common PHP file which can share some code between upgrades or perhaps not - you what you think?

DA

Alexander Obuhovich

unread,
Jun 2, 2012, 3:40:02 AM6/2/12
to in-por...@googlegroups.com
We already have this file: kUpgradeHelper class, that is common ancestor to all php upgrade scripts (in all modules). Now it would be also a common  ancestor to different version php scripts within one module aswell.

Dmitry A.

unread,
Jun 3, 2012, 1:39:31 AM6/3/12
to in-por...@googlegroups.com
Great! Then I am for it with my both hands!

DA

Alexander Obuhovich

unread,
Jun 11, 2012, 8:05:09 AM6/11/12
to in-por...@googlegroups.com
Here is the task: http://tracker.in-portal.org/view.php?id=1314


On Sun, Jun 3, 2012 at 8:39 AM, Dmitry A. <dand...@gmail.com> wrote:
Great! Then I am for it with my both hands!

DA



Alexander Obuhovich

unread,
Nov 7, 2012, 7:15:13 AM11/7/12
to Development In-Portal
Another positive side effect - during merging from bugfix branch into feature branch there won't be conflicts in upgrades.sql and upgrades.php files like now, because each version is separately added file.

I'm recommending not to wait too long before implementing that, because currently /core/install/upgrades.sql is already 161KB long, which is twice larger, then average PHP file in In-Portal.

Dmitry A.

unread,
Nov 12, 2012, 1:36:51 AM11/12/12
to in-por...@googlegroups.com
I have moved this task to In-Portal 5.3.0.

I believe it deserves our attention.


DA

Alexander Obuhovich

unread,
Nov 18, 2012, 3:52:07 PM11/18/12
to Development In-Portal
Good.
Reply all
Reply to author
Forward
0 new messages