← Back to team overview

mahara-contributors team mailing list archive

[Bug 1855798] Re: Database anomalies and orphan tables

 

I looked into this and made comments for what I think we should do for
each of the three issues

1. Single column tables: I couldn't find any reason for not having a
single column table other than a table with a single column design can
usually benefit from an additional column.

we need to see if the tables
artefact_comment_deletedby
event_type
view_type

are needed (should remain as a single column table) and make sure they
don't need any data associated that could be added as a second column

2. incrementing column names: the only table affected would be 'usr_friend' because it has columns 'user1' and 'user2' . This would be a problem if those two columns had different meaning and taking one for the other would be a problem. But they represent friend relation between accounts, so it doesn't matter if a user is under user1 or user2
There is no need to change this table

3. orphaned tables (tables without any foreign key relations): we should check if any of the following table columns should be set up to be a foreign key
artefact_file_mime_types
config
usr_access_roles site_data
artefact_license
blocktype_taggedposts_tags
oauth_server_nonce
usr_session external_functions
search_elasticsearch_queue
site_menublocktype_openbadgedisplayer_data
cron
sso_session
blocktype_externalfeed_data
skin_fonts

-- 
You received this bug notification because you are a member of Mahara
Contributors, which is subscribed to Mahara.
Matching subscriptions: Subscription for all Mahara Contributors -- please ask on #mahara-dev or mahara.org forum before editing or unsubscribing it!
https://bugs.launchpad.net/bugs/1855798

Title:
  Database anomalies and orphan tables

Status in Mahara:
  New

Bug description:
  While investigating how to map out Mahara and see what connects to
  what a discovered a db schema-mapping tool. (Details in the bug
  report: https://bugs.launchpad.net/mahara/+bug/1855630)

  That highlighted some issues with our db schema:

  'Anomalies'
  We have 3 tables that contain a single column:
  artefact_comment_deletedby
  event_type
  view_type

  We have 1 table with incrementing column names, potentially indicating denormalization
  usr_friend

  We have a number of orphan tables listed in the comment below.

To manage notifications about this bug go to:
https://bugs.launchpad.net/mahara/+bug/1855798/+subscriptions


References