?
avatar photodude
photodude
24 Apr 2016

Steps to reproduce the issue

Review the access column for the following tables

installation/sql/mysql/joomla.sql
#__categories, #__contact_details, #__content, #__languages, #__menu, #__modules, #__newsfeeds, #__tags, #__ucm_content, #__extensions, #__finder_links, #__finder_taxonomy

administrator/components/com_finder/sql/install.mysql.sql
#__finder_links

administrator/components/com_contact/sql/install.mysql.utf8.sql
#__contact_details

administrator/components/com_newsfeeds/sql/install.mysql.utf8.sql
#__newsfeeds

Expected result

All tables should have a consistent database schema for the access column

Going with the value for the Asset ID from the #__assets table

`access` int(10) unsigned NOT NULL DEFAULT 0,

or for the extentions table (higher default permissions)
#__extensions

`access` int(10) unsigned NOT NULL DEFAULT 1,

Actual result

#__finder_links

`access` int(5) DEFAULT 0,

#__finder_taxonomy

`access` tinyint(1) unsigned NOT NULL DEFAULT 0,

administrator/components/com_finder/sql/install.mysql.sql
#__finder_links

`access` int(5) default '0',

administrator/components/com_contact/sql/install.mysql.utf8.sql
#__contact_details

`access` tinyint(3) unsigned NOT NULL default '0',

administrator/components/com_newsfeeds/sql/install.mysql.utf8.sql
#__newsfeeds

`access` tinyint UNSIGNED NOT NULL DEFAULT '0',

Additional comments

I only reviewed the access column when I noticed the inconsistency, other common columns should also be reviewed and should be made consistent.
Recommended for review

  • alias
    • varchar(400) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL DEFAULT ''
  • state / published
    • tinyint(1) NOT NULL DEFAULT 0
  • catid
    • int(11) unsigned NOT NULL DEFAULT 0
  • ordering
    • int(11) unsigned NOT NULL DEFAULT 0
  • metakey
  • params
  • checked_out
    • int(11) unsigned NOT NULL DEFAULT 0
  • checked_out_time
    • datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
  • publish_up
    • datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
  • publish_down
    • datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
  • created
    • datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
  • language / lang_code
    • char(7) NOT NULL
  • created_by / created_user_id
    • int(11) unsigned NOT NULL DEFAULT 0
  • created_by_alias
  • modified
    • datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
  • modified_by / modified_user_id
    • int(11) unsigned NOT NULL DEFAULT 0
  • version
    • int(11) unsigned NOT NULL DEFAULT 1
avatar photodude photodude - open - 24 Apr 2016
avatar photodude photodude - change - 24 Apr 2016
The description was changed
avatar brianteeman brianteeman - change - 24 Apr 2016
Category SQL
avatar photodude photodude - change - 24 Apr 2016
Title
Inconsistency in Database schema in `access` columns
Inconsistency in Database schema for `access` columns
avatar photodude photodude - change - 24 Apr 2016
Title
Inconsistency in Database schema in `access` columns
Inconsistency in Database schema for `access` columns
avatar brianteeman brianteeman - change - 25 Apr 2016
Labels Added: ?
avatar photodude photodude - change - 26 Apr 2016
The description was changed
avatar brianteeman
brianteeman - comment - 4 Aug 2016

Closed as we have a PR #10098

avatar photodude
photodude - comment - 15 Oct 2016

This should be reopened since there wasn't enough interest in PR #10098. This issue should still be fixed.

Add a Comment

Login with GitHub to post a comment