Uploaded image for project: 'Poulpe'
  1. Poulpe
  2. POULPE-269

Clean up COMPONENTS table

VotersWatchers
    XMLWordPrintable

    Details

      Description

      The current structure of the component:

      +----------------+--------------+------+-----+---------+----------------+
      | Field          | Type         | Null | Key | Default | Extra          |
      +----------------+--------------+------+-----+---------+----------------+
      | CMP_ID         | bigint(20)   | NO   | PRI | NULL    | auto_increment |
      | COMPONENT_TYPE | varchar(255) | NO   |     | NULL    |                |
      | UUID           | varchar(255) | NO   | UNI | NULL    |                |
      | NAME           | varchar(255) | NO   | UNI | NULL    |                |
      | DESCRIPTION    | varchar(255) | YES  |     | NULL    |                |
      | C_TYPE         | int(11)      | YES  | UNI | NULL    |                |
      +----------------+--------------+------+-----+---------+----------------+

      We need to get rid of _C_TYPE_ column and rely only on COMPONENT_TYPE. They are used by different mechanisms: COMPONENT_TYPE is used by the inheritance mapping of the Component and its children, and the _C_TYPE_ is set by componentType field. We don't need this type, we need only inheritance, thus:

      1. ComponentType enum should be removed
      2. Compnent#componentType field should be removed
      3. COMPONENTS#C_TYPE column should be removed
      4. DAO & Service methods that rely on ComponentType.JCOMMUNE should be replaced with getJcommune() method and its usages should be updated accordingly.

      Additionally column CMP_ID should be renamed to ID.

        Attachments

          Structure

            Activity

              People

              • Assignee:
                ctapobep Stanislav Bashkyrtsev
                Reporter:
                ctapobep Stanislav Bashkyrtsev
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 4h
                  4h
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 2h Time Not Required
                  2h

                    Structure Helper Panel