Note that there are some explanatory texts on larger screens.

plurals
  1. POsql triggers and technical debt
    primarykey
    data
    text
    <p>My boss asked me to create a easier system for finding points by having points associated with the user table in our mysql database. The old system just had events, there point values, then another table with events completed for a user, and then another table for just admin given points. So my job was to add these all together and put them in a column. Now he says the problem is that there is still all the queries running around adding points, but instead of changing them to simply add points to the users column upon task completion, they suggested i use a trigger to simply add points to the users column, when one of the other columns has points added to it.</p> <p>To me this sounds like using a work-around and creating technical debt. Am i wrong? </p> <p>Im new to the system, and i dont know exactly where all the queries are in the php pages, but if this is creating technical debt, what would be the appropriate way to fix this.</p> <p>Im new and am probably going to just use sql triggers as to not go against my boss's suggestions, I want to at least know the smart/best way to do things.</p> <p>Doing my best to provide not actual, but near actual db schema EVENT: ID, point value, Desc User-Events: USERID, EVENTID, COMPLETION-STATUS GIVEN-POINTS:USERID, POINTS_GIVEN, DESC (Each time points are given, so its more of a log than updated points)</p> <p>I added a Points column to the basic USER TABLE the trigger would be when user-Event completion-status =done, find point value, add to points in user, instead of changing queries to do that.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload