Add pg4wp plugin and update wordpress.yaml

This commit is contained in:
gitea_admin committed 2026-10-02 22:47:41 +03:30
1 parent 0a51ac0a31
commit a4d8c0f418
23 files changed
+4304 -6

No files matched your search

+17
View File
@@ -0,0 +1,17 @@
<?php
class DropTableSQLRewriter extends AbstractSQLRewriter
{
public function rewrite(): string
{
$sql = $this->original();
$pattern = '/DROP TABLE.+ [`]?(\w+)[`]?$/';
preg_match($pattern, $sql, $matches);
$table = $matches[1];
$seq = $table . '_seq';
$sql .= ";\nDROP SEQUENCE IF EXISTS $seq;";
return $sql;
}
}