? Success

User tests: Successful: Unsuccessful:

avatar sovainfo
sovainfo
17 Mar 2014

[#32614] 3.2.0 introduces drop column as schema updates for PostgreSQL. But there is no support for it, untill now!

tracker: http://joomlacode.org/gf/project/joomla/tracker/?action=TrackerItemEdit&tracker_item_id=32614&start=0

avatar sovainfo sovainfo - open - 17 Mar 2014
avatar sovainfo sovainfo - change - 17 Mar 2014
Title
drop column support for PostgreSQL in Extension manager => Database
[#32614] drop column support for PostgreSQL in Extension manager => Database
avatar wilsonge
wilsonge - comment - 17 Mar 2014

Isn't there some horrific bug on line 210 of this file?

avatar sovainfo
sovainfo - comment - 17 Mar 2014

Are you referring to the assignment in a condition?

avatar wilsonge
wilsonge - comment - 17 Mar 2014

Yeah but don't worry I didn't read the code properly. I thought it was supposed to be a check that the two were equal but it's not. Although the else seems unnecessary as we've already set checkStatus to be -1 here https://github.com/sovainfo/joomla-cms/blob/patch-13/libraries/cms/schema/changeitem/postgresql.php#L41 but for another patch

avatar sovainfo
sovainfo - comment - 17 Mar 2014

Don't like this construct either. Consider it confusing, don't know whether it is against the coding standard. Not convinced it should be disallowed,Think it deserves documentation.

Did you manage to get this tested?

avatar nicksavov nicksavov - change - 21 Aug 2014
Labels Removed: ?
avatar brianteeman brianteeman - change - 21 Aug 2014
The description was changed
avatar brianteeman brianteeman - change - 1 Sep 2014
Category Postgresql
avatar vdespa vdespa - change - 13 Sep 2014
Status New Pending
avatar nicksavov nicksavov - change - 16 Oct 2014
Labels Added: ?
avatar waader
waader - comment - 23 Oct 2014

I did not know how to exactly test this one. So I added one line to the lastest postgresql update file (3.4.0-2014-09-16.sql) in the current branche - ALTER TABLE "#__user_profiles" DROP COLUMN "profile_value"; - and expected not to find this column after the successful installation. But it was present.

If I did do it wrong please advice how to test this.

avatar sovainfo
sovainfo - comment - 23 Oct 2014

@waader Thank you for testing. The way to test this is very easy: Run Extension manager->Database on MySQL. It will recognize the ALTER TABLE DROP COLUMN by reporting them when those columns still exist. Running Fix will drop the column. Now test this on PostgreSQL. Find a ALTER TABLE DROP COLUMS in the sql updates. Verifiy whether the column exists, create it if it doesn't. Extension manager->Database should detect it and allow Fix to drop it.

The test you did was testing whether updates can drop columns. No need for testing that, it normally works. Don't know what went wrong with your test, but it is not what this is about. This is about detecting you wanted to drop a column, but it is still there.
Without my PR it doesn't even get noticed!

avatar waader
waader - comment - 24 Oct 2014

I installed the current staging branch and went to the Extension manager -> Database and got some messages. Please have a look at #4922.

Then I added a line to 3.3.4-2014-08-03.sql with the ALTER TABLE DROP command and did a refresh. But I got no additional message.

I tried the same with mysql but I got no message just as well. Can you try it yourself and tell me what you did exactly. Thank you!

avatar sovainfo
sovainfo - comment - 24 Oct 2014

On 337-dev with this patch applied.
Added: ALTER TABLE "#__user_profiles" drop COLUMN "profile_value" ; to sql script
See last line added because of drop column:
extmdb

avatar wilsonge
wilsonge - comment - 24 Oct 2014

I added ALTER TABLE "#__user_profiles" DROP COLUMN "profile_value"; into https://github.com/joomla/joomla-cms/blob/staging/administrator/components/com_admin/sql/updates/postgresql/3.3.6-2014-09-30.sql

Upon applying the patch I found the code ran in the elseif however no extra messages appeared in the database problems view.

avatar wilsonge
wilsonge - comment - 24 Oct 2014

Correction. I'm a complete moron and added it into the 3.3.6 mysql file instead of postgres file. works as expected. One more tester

avatar wilsonge wilsonge - test_item - 24 Oct 2014 - Tested successfully
avatar waader
waader - comment - 26 Oct 2014

Well, I added the sql statement from @wilsonge in the stated file but I didnĀ“t get the expected result. As I wrote before: neither in my mysql installation nor in my postgres installation an additional line indicates that a column should no be present in a table.

It must have to do with my testing environment - centos 6.5, php 5.4.16, fresh installation of the latest staging branch.

I will dig depper into it. Also I wonder if you experience the behaviour desripted in #4922.

avatar waader
waader - comment - 26 Oct 2014

@test Success. I made a fresh install using a ubuntu server and it worked.

With my centos installation and a self-compiled php I faced already some other inexplicable problems during pbf14.

avatar wilsonge wilsonge - alter_testresult - 26 Oct 2014 - waader: Tested successfully
avatar wilsonge wilsonge - change - 26 Oct 2014
Status Pending Ready to Commit
avatar wilsonge
wilsonge - comment - 26 Oct 2014

2 good tests. RTC. Thanks guys :smile:

This comment was created with the J!Tracker Application at issues.joomla.org/joomla-cms/3313.

avatar Bakual
Bakual - comment - 26 Oct 2014

Merged into staging.

avatar Bakual Bakual - close - 26 Oct 2014
avatar Bakual Bakual - close - 26 Oct 2014
avatar Bakual Bakual - change - 26 Oct 2014
Status Ready to Commit Closed
Closed_Date 0000-00-00 00:00:00 2014-10-26 22:33:21
avatar sovainfo sovainfo - head_ref_deleted - 3 Apr 2015

Add a Comment

Login with GitHub to post a comment