We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 53908de commit 7c0522aCopy full SHA for 7c0522a
1 file changed
src/DeployCache.php
@@ -24,12 +24,17 @@ public static function createTable(): void {
24
path VARCHAR(2083) NOT NULL,
25
file_hash CHAR(32) NOT NULL,
26
namespace VARCHAR(128) NOT NULL,
27
- PRIMARY KEY (id),
28
- UNIQUE KEY path_hash_ns_idx (path_hash, namespace)
+ PRIMARY KEY (id)
29
) $charset_collate;";
30
31
require_once ABSPATH . 'wp-admin/includes/upgrade.php';
32
dbDelta( $sql );
+
33
+ Controller::ensureIndex(
34
+ $table_name,
35
+ 'path_hash_ns_idx',
36
+ "CREATE UNIQUE INDEX path_hash_ns_idx ON $table_name (path_hash, namespace)"
37
+ );
38
}
39
40
public static function addFile(
0 commit comments