protected function GdprSanitize::rename in General Data Protection Regulation 3.0.x
Same name and namespace in other branches
- 8.2 modules/gdpr_dump/src/Service/GdprSanitize.php \Drupal\gdpr_dump\Service\GdprSanitize::rename()
- 8 modules/gdpr_dump/src/Service/GdprSanitize.php \Drupal\gdpr_dump\Service\GdprSanitize::rename()
Rename the cloned tables to the original tables.
1 call to GdprSanitize::rename()
- GdprSanitize::sanitize in modules/
gdpr_dump/ src/ Service/ GdprSanitize.php - Go through the data and sanitize it.
File
- modules/
gdpr_dump/ src/ Service/ GdprSanitize.php, line 28
Class
- GdprSanitize
- Class GdprSqlDump.
Namespace
Drupal\gdpr_dump\ServiceCode
protected function rename() {
$transaction = $this->database
->startTransaction('gdpr_rename_table');
foreach (array_keys($this->tablesToAnonymize) as $table) {
$gdprTable = self::GDPR_TABLE_PREFIX . $table;
$this->database
->schema()
->dropTable($table);
$this->database
->schema()
->renameTable($gdprTable, $table);
}
$this->database
->popTransaction($transaction
->name());
}