Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[postgresql] - remove notice from manage database #14423

Closed
wants to merge 5 commits into from
Closed

[postgresql] - remove notice from manage database #14423

wants to merge 5 commits into from

Conversation

alikon
Copy link
Contributor

@alikon alikon commented Mar 8, 2017

Pull Request for Issue #14331 .

Summary of Changes

managed DROP DEFAULT on JSchemaChangeitem for postgresql

Testing Instructions

With latest staging on postgresql go to Manage > Database.

Expected result

no notice

Actual result

Notice: Undefined offset:

drop default not needed
@waader
Copy link
Contributor

waader commented Mar 8, 2017

I have tested this item ✅ successfully on 2e35e03

Thanks alikon!


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

@csthomas
Copy link
Contributor

csthomas commented Mar 8, 2017

IMO this is the wrong solution. We can not remove DROP DEFAULT from update files.

We have to fix php code in https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/schema/changeitem/postgresql.php#L132
I suppose that reverse the order of elseif
with
https://github.com/joomla/joomla-cms/blob/staging/libraries/cms/schema/changeitem/postgresql.php#L111
would solve the problem.

@alikon
Copy link
Contributor Author

alikon commented Mar 9, 2017

could be i've checked rather quickly,
but why

We can not remove DROP DEFAULT from update files.

@csthomas
Copy link
Contributor

csthomas commented Mar 9, 2017

  • because drop default - in general this is not a solution but only temporary fix, we do not want to remove all "DROP DEFAULT ..." from sql updates files.
  • because other databases does not have default too
  • because bug is in the file mentioned by me earlier, not in sql updates files.

@alikon
Copy link
Contributor Author

alikon commented Mar 10, 2017

i've just looked at #__contact_details and
ALTER TABLE "#__contact_details" ALTER COLUMN "name" DROP DEFAULT;
even if for me is not needed (DROP DEFAULT) , i agree with you should be correctly managed by changeitem for postgresql

handle alter column drop default
revert changes
@waader
Copy link
Contributor

waader commented Mar 28, 2017

I have tested this item ✅ successfully on 0aae960


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

@alikon
Copy link
Contributor Author

alikon commented Nov 2, 2017

conflict fixed in #18483

@alikon alikon closed this Nov 2, 2017
@alikon alikon deleted the patch-85 branch November 2, 2017 19:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants