PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar richard67
richard67
17 Jul 2023

Pull Request for https://github.com/joomla/joomla-cms/pull/38149/files#r1265261563 .

Summary of Changes

PostgreSQL doesn't support "AFTER" in "ALTER TABLE ... ADD COLUMN ..." statements, see https://www.postgresql.org/docs/current/sql-altertable.html .

This pull request (PR) here fixes the wrong SQL statement added with PR #38149 .

Testing Instructions

Run the SQL statement changed by this PR on a PostgreSQL database with a 5.0-dev Joomla installation which doesn't have PR #38149 applied.

Actual result BEFORE applying this Pull Request

SQL syntax error.

Expected result AFTER applying this Pull Request

Column is added.

Link to documentations

Please select:

  • No documentation changes for docs.joomla.org needed

  • No documentation changes for manual.joomla.org needed

avatar joomla-cms-bot joomla-cms-bot - change - 17 Jul 2023
Category Postgresql SQL Administration com_admin
avatar richard67 richard67 - open - 17 Jul 2023
avatar richard67 richard67 - change - 17 Jul 2023
Status New Pending
avatar HLeithner
HLeithner - comment - 17 Jul 2023

does that mean postgresql adds the column always to the end?

avatar brianteeman
brianteeman - comment - 17 Jul 2023

sorry about that

avatar richard67
richard67 - comment - 17 Jul 2023

does that mean postgresql adds the column always to the end?

@HLeithner Yes, and the same applies to other relational databases like Oracle, MS SQL Server, DB2, ... . Only MySQL and MariaDB support that. The order of columns in a table is absolutely irrelevant and so doesn't really matter.

avatar HLeithner
HLeithner - comment - 17 Jul 2023

only if you don't care about your structure ;-) ok thanks

avatar HLeithner HLeithner - change - 17 Jul 2023
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-07-17 12:55:05
Closed_By HLeithner
Labels Added: PR-5.0-dev
avatar HLeithner HLeithner - close - 17 Jul 2023
avatar HLeithner HLeithner - merge - 17 Jul 2023

Add a Comment

Login with GitHub to post a comment