get_charset_collate(); dbDelta( "CREATE TABLE {$table} ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, consent_id char(36) NOT NULL, created_at datetime NOT NULL, revision int(10) unsigned NOT NULL DEFAULT 1, action varchar(20) NOT NULL, categories text NOT NULL, snapshot char(64) NOT NULL DEFAULT '', PRIMARY KEY (id), KEY consent_id (consent_id), KEY created_at (created_at) ) {$charset};" ); $snapshots = Snapshots::table(); dbDelta( "CREATE TABLE {$snapshots} ( id bigint(20) unsigned NOT NULL AUTO_INCREMENT, hash char(64) NOT NULL, created_at datetime NOT NULL, content longtext NOT NULL, PRIMARY KEY (id), UNIQUE KEY hash (hash) ) {$charset};" ); } }