Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Jelle 6 posts 46 karma points
    Sep 06, 2018 @ 10:22
    Jelle
    0

    Umbraco Health: Database Schema Validation

    Hi,

    I've recently upgraded to 7.12.2 and now I've got the Health-checks. When I check my log for the Database Schema Validation messages, I see the following:

    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Some errors were detected while validating the database schema against the 
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Table: database_firewall_rules
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,id
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,name
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,start_ip_address
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,end_ip_address
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,create_date
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Column: database_firewall_rules,modify_date
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Index: IX_umbracoNode_uniqueID
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Index: nci_wi_umbracoNode_F832BF0A5C74983020A6FFC23F949E30
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Index: IX_umbracoNodeUniqueID
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Constraint: FK_umbracoExternalLogin_umbracoUser_id
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Constraint: FK_umbracoRedirectUrl
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Constraint: FK_umbracoRedirectUrl_umbracoNode_uniqueID
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Constraint: PK_umbracoMigrations
    Umbraco.Web.HealthCheck.Checks.DataIntegrity.DatabaseSchemaValidationHealthCheck - Constraint: PK_umbracoMigration
    

    How can I fix these issues? Can I find some SQL-statements to execute?

    Thanks!

  • Alex Skrypnyk 6182 posts 24284 karma points MVP 8x admin c-trib
    Sep 07, 2018 @ 08:54
    Alex Skrypnyk
    0

    Hi Jelle

    Do you know what "databasefirewallrules" table is? Did you create it ?

    Alex

  • Jelle 6 posts 46 karma points
    Sep 07, 2018 @ 09:52
    Jelle
    0

    Hi,

    No, I didn't create it. I've found this table as view under "Views > System Views" (in MS SQL Server Management Studio). My DB is a Azure SQL-DB.

  • Masahiko Isshiki 2 posts 22 karma points
    Sep 21, 2018 @ 09:36
    Masahiko Isshiki
    0

    I'm in the exactly same situation. I have two sites using Azure SQL-DB. And both sites has the same issues. So, I suspect it is a bug of "Umbraco Health: Database Schema Validation".

    One site is warning about "Table: database_firewall_rules". Another site is warning about "Table: database_firewall_rules", "Table: script_deployments" and "Table: script_deployment_status".

    These tables exists in system views of database like "sys.database_firewall_rules".

    I have no idea to fix this problem.

  • Dan Diplo 1554 posts 6205 karma points MVP 6x c-trib
    Sep 21, 2018 @ 12:42
    Dan Diplo
    0

    See this issue for more context: https://issues.umbraco.org/issue/U4-11580

  • Masahiko Isshiki 2 posts 22 karma points
    Oct 10, 2018 @ 06:50
    Masahiko Isshiki
    0

    According to the following issue page, this problem seems to be avoidable in the next version 7.13.0.
    "Disable DatabaseSchemaValidationHealthCheck until we can make it give proper recommendations · Issue #3132 · umbraco/Umbraco-CMS"


    I think ValidateDbTables() method in DatabaseSchemaCreation.cs file of the version 7.12.3 shoud be fixed.

    foreach (var tableName in invalidTableDifferences)
    {
      // TODO: I think this code is adding all tables that differ between the umbraco tables and the real tables. 
      // But this code should ignore unknown tables that are not included in the umbraco defined tables.
      result.Errors.Add(new Tuple<string, string>("Table", tableName));
    }
    

    I think that it's better to check this thought to fix the problem, but I have no enough time to check now...

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies