Page MenuHomeDevCentral

Check table and view existence
ClosedPublic

Authored by dereckson on Feb 11 2022, 00:21.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 04:59
Unknown Object (File)
Tue, Dec 17, 12:49
Unknown Object (File)
Sun, Dec 15, 05:06
Unknown Object (File)
Sat, Dec 14, 05:59
Unknown Object (File)
Fri, Dec 13, 19:15
Unknown Object (File)
Thu, Dec 12, 19:10
Unknown Object (File)
Sun, Dec 8, 03:28
Unknown Object (File)
Sat, Dec 7, 10:41
Subscribers
None

Details

Summary

An example of use is Zed site health check for database views.
This check detect frequent import/export issues with views:

$notExistingViews = Vector::from(self::DOCUMENTED_VIEWS)
    ->filter(fn($view) => !$this->db->isExistingTable(
        $this->config['database']['database'],
        $view
    ));
$viewsAsTables = Vector::from(self::DOCUMENTED_VIEWS)
    ->filter(fn($view) => !$this->db->isView(
        $this->config['database']['database'],
        $view
    ));

Ref T1678.

Diff Detail

Repository
rKDB Keruald Database
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

dereckson created this revision.
This revision is now accepted and ready to land.Feb 11 2022, 00:43
This revision was landed with ongoing or failed builds.Feb 11 2022, 00:52
This revision was automatically updated to reflect the committed changes.