Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Standardize Refernetial Integrity Implementation. #214

Open
NathanGibbs3 opened this issue Jun 12, 2023 · 0 comments
Open

Standardize Refernetial Integrity Implementation. #214

NathanGibbs3 opened this issue Jun 12, 2023 · 0 comments
Assignees
Labels
DB Database Issues DB-Oracle Issues related to Oracle DB enhancement New feature or request help wanted Extra attention is needed invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. Prod Observed in Production Environment. question Further information is requested Stability Issue impacts or is related to App Stability.

Comments

@NathanGibbs3
Copy link
Owner

NathanGibbs3 commented Jun 12, 2023

Item Description
File(s):
Class:
Function:
Similar Issues:
Depends on Issue(s): #103 #212 #215
Dependency Type: Hard
Misc. Info.:

Expected Behavior:

  • We can Unit Test this.
  • We can use it, if configured, based on installed DB Server Version / features and ignore the config value if the DB server does not actually support it.
DB Platform Minimum Version Feature
MsSQL MsSQL Server 2000 1 (8.0.194) 2
MySQL 3.23+ 3 InnoDB or ( NDB 7.3+ ) Storage Engine. 4
PostgreSQL 7.0 5
Oracle Need help from those with Oracle DB experience.

1 - https://www.itprotoday.com/sql-server/referential-integrity-sql-server
2 - https://sqlserverbuilds.blogspot.com/
3 - https://en.wikipedia.org/wiki/Comparison_of_MySQL_database_engines
4 - https://dev.mysql.com/doc/refman/8.0/en/storage-engines.html
5 - https://en.wikipedia.org/wiki/PostgreSQL

Current Behavior:
Code around the Referential Integrity DB feature is not standardized into things that can be tested.

@NathanGibbs3 NathanGibbs3 added LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. DB Database Issues Stability Issue impacts or is related to App Stability. help wanted Extra attention is needed question Further information is requested labels Jun 12, 2023
@NathanGibbs3 NathanGibbs3 self-assigned this Jun 20, 2023
@NathanGibbs3 NathanGibbs3 added enhancement New feature or request invalid This doesn't seem right Prod Observed in Production Environment. DB-Oracle Issues related to Oracle DB labels Jun 20, 2023
NathanGibbs3 added a commit that referenced this issue Jun 21, 2023
         Code Cleanup.

     File(s): base_conf.php.dist
            : base_maintenance.php
            : includes/base_action.inc.php
            : setup/base_conf_contents.php
    Issue(s): #103 #212 #214 #215
              Code Cleanup.
     File(s): includes/base_auth.inc.php
              Code Cleanup.
     File(s): includes/base_db.inc.php
    Issue(s): #103 #212 #214 #215
              Added DB connection awarenes to multiple functions.
              This allows us to log transient DB connection errors.
              Code Cleanup.
 Function(s): baseisDBUp( LogError )
              Returns true if DB connection is up, false otherwise.
              Optionally logs the connection error.
            : baseSetRI( State )
              DB Referential Integrity (RI) Control. Enables / Disables
              RI on DB server software that supports it. Adding /
              removing the necessary RI structure to the DB. Respects
              the $use_referential_integrity conf var.
            : baseGetRI()
              Returns the RI status of the connected DB.
            : baseTSE( table )
              Returns the MySQL/MariaDB storage engine of the
              requested table, empty string otherwise.
     File(s): includes/base_krnl.php
              Bumped Kernel Version to 0.0.7
              Code Cleanup.
 Function(s): function VS2SV( VS )
              Returns Semantic Version Array determined from
              supplied Version string, false if unsucessful.
     File(s): includes/base_rtl.php
              Bumped Kernel Version to 0.0.11
              Code Cleanup.
 Function(s): function VS2SV( VS )
              Returns Semantic Version Array determined from
              supplied Version string, false if unsucessful.
     File(s): sql/create_snort_tbls_*.sql
              Added DB creation scripts from the SNORT project.
              Schema 107
              Now it is possible to manually initialize the entire DB
              from a BASE snapshot.
     File(s): sql/disable_RI*.sql
              Scripts to manually disable RI in the DB.
Unit Test(s): Covers the following in the baseCon Class baseisDBUp()
              baseSetRI() baseGetRI() baseTSE()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
DB Database Issues DB-Oracle Issues related to Oracle DB enhancement New feature or request help wanted Extra attention is needed invalid This doesn't seem right LCB-TechDebt Issue exists in Legacy Code Base. We inherited it. Prod Observed in Production Environment. question Further information is requested Stability Issue impacts or is related to App Stability.
Projects
None yet
Development

No branches or pull requests

1 participant