@@ -163,6 +163,7 @@ discard block |
||
| 163 | 163 | //-------------------------------------------------------------------------------------------------------------------- |
| 164 | 164 | /** |
| 165 | 165 | * {@inheritdoc} |
| 166 | + * @param string $query |
|
| 166 | 167 | */ |
| 167 | 168 | public static function executeNone($query) |
| 168 | 169 | { |
@@ -185,6 +186,7 @@ discard block |
||
| 185 | 186 | //-------------------------------------------------------------------------------------------------------------------- |
| 186 | 187 | /** |
| 187 | 188 | * {@inheritdoc} |
| 189 | + * @param string $query |
|
| 188 | 190 | */ |
| 189 | 191 | public static function executeRow1($query) |
| 190 | 192 | { |
@@ -196,6 +198,7 @@ discard block |
||
| 196 | 198 | //-------------------------------------------------------------------------------------------------------------------- |
| 197 | 199 | /** |
| 198 | 200 | * {@inheritdoc} |
| 201 | + * @param string $query |
|
| 199 | 202 | */ |
| 200 | 203 | public static function executeRows($query) |
| 201 | 204 | { |
@@ -83,14 +83,14 @@ discard block |
||
| 83 | 83 | $additionSql) |
| 84 | 84 | { |
| 85 | 85 | $helper = new CreateAuditTrigger($dataSchemaName, |
| 86 | - $auditSchemaName, |
|
| 87 | - $tableName, |
|
| 88 | - $triggerName, |
|
| 89 | - $triggerAction, |
|
| 90 | - $auditColumns, |
|
| 91 | - $tableColumns, |
|
| 92 | - $skipVariable, |
|
| 93 | - $additionSql); |
|
| 86 | + $auditSchemaName, |
|
| 87 | + $tableName, |
|
| 88 | + $triggerName, |
|
| 89 | + $triggerAction, |
|
| 90 | + $auditColumns, |
|
| 91 | + $tableColumns, |
|
| 92 | + $skipVariable, |
|
| 93 | + $additionSql); |
|
| 94 | 94 | $sql = $helper->buildStatement(); |
| 95 | 95 | |
| 96 | 96 | self::executeNone($sql); |
@@ -258,8 +258,8 @@ discard block |
||
| 258 | 258 | where TABLE_SCHEMA = %s |
| 259 | 259 | and TABLE_NAME = %s |
| 260 | 260 | order by ORDINAL_POSITION', |
| 261 | - parent::quoteString($schemaName), |
|
| 262 | - parent::quoteString($tableName)); |
|
| 261 | + parent::quoteString($schemaName), |
|
| 262 | + parent::quoteString($tableName)); |
|
| 263 | 263 | |
| 264 | 264 | return self::executeRows($sql); |
| 265 | 265 | } |
@@ -283,8 +283,8 @@ discard block |
||
| 283 | 283 | inner join information_schema.COLLATION_CHARACTER_SET_APPLICABILITY t2 on t2.COLLATION_NAME = t1.TABLE_COLLATION |
| 284 | 284 | WHERE t1.TABLE_SCHEMA = %s |
| 285 | 285 | AND t1.TABLE_NAME = %s', |
| 286 | - parent::quoteString($schemaName), |
|
| 287 | - parent::quoteString($tableName)); |
|
| 286 | + parent::quoteString($schemaName), |
|
| 287 | + parent::quoteString($tableName)); |
|
| 288 | 288 | |
| 289 | 289 | return self::executeRow1($sql); |
| 290 | 290 | } |
@@ -306,8 +306,8 @@ discard block |
||
| 306 | 306 | where TRIGGER_SCHEMA = %s |
| 307 | 307 | and EVENT_OBJECT_TABLE = %s |
| 308 | 308 | order by Trigger_Name', |
| 309 | - parent::quoteString($schemaName), |
|
| 310 | - parent::quoteString($tableName)); |
|
| 309 | + parent::quoteString($schemaName), |
|
| 310 | + parent::quoteString($tableName)); |
|
| 311 | 311 | |
| 312 | 312 | return self::executeRows($sql); |
| 313 | 313 | } |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | where TRIGGER_SCHEMA = %s |
| 350 | 350 | order by EVENT_OBJECT_TABLE |
| 351 | 351 | , TRIGGER_NAME', |
| 352 | - parent::quoteString($schemaName)); |
|
| 352 | + parent::quoteString($schemaName)); |
|
| 353 | 353 | |
| 354 | 354 | return self::executeRows($sql); |
| 355 | 355 | } |
@@ -91,7 +91,7 @@ |
||
| 91 | 91 | $tableColumns, |
| 92 | 92 | $skipVariable, |
| 93 | 93 | $additionSql); |
| 94 | - $sql = $helper->buildStatement(); |
|
| 94 | + $sql = $helper->buildStatement(); |
|
| 95 | 95 | |
| 96 | 96 | self::executeNone($sql); |
| 97 | 97 | } |
@@ -159,8 +159,8 @@ discard block |
||
| 159 | 159 | { |
| 160 | 160 | $this->io->writeln(sprintf('<info>Found new table %s</info>', $table['table_name'])); |
| 161 | 161 | $this->config['tables'][$table['table_name']] = ['audit' => false, |
| 162 | - 'alias' => null, |
|
| 163 | - 'skip' => null]; |
|
| 162 | + 'alias' => null, |
|
| 163 | + 'skip' => null]; |
|
| 164 | 164 | } |
| 165 | 165 | } |
| 166 | 166 | } |
@@ -224,15 +224,15 @@ discard block |
||
| 224 | 224 | } |
| 225 | 225 | |
| 226 | 226 | $configTable = new TableMetadata($table['table_name'], |
| 227 | - $this->config['database']['data_schema'], |
|
| 228 | - $tableColumns); |
|
| 227 | + $this->config['database']['data_schema'], |
|
| 228 | + $tableColumns); |
|
| 229 | 229 | |
| 230 | 230 | $currentTable = new AuditTable($this->io, |
| 231 | - $configTable, |
|
| 232 | - $this->config['database']['audit_schema'], |
|
| 233 | - $this->auditColumnsMetadata, |
|
| 234 | - $this->config['tables'][$table['table_name']]['alias'], |
|
| 235 | - $this->config['tables'][$table['table_name']]['skip']); |
|
| 231 | + $configTable, |
|
| 232 | + $this->config['database']['audit_schema'], |
|
| 233 | + $this->auditColumnsMetadata, |
|
| 234 | + $this->config['tables'][$table['table_name']]['alias'], |
|
| 235 | + $this->config['tables'][$table['table_name']]['skip']); |
|
| 236 | 236 | |
| 237 | 237 | // Ensure an audit table exists. |
| 238 | 238 | if (AuditDataLayer::searchInRowSet('table_name', $table['table_name'], $this->auditSchemaTables)===null) |
@@ -256,15 +256,15 @@ discard block |
||
| 256 | 256 | else |
| 257 | 257 | { |
| 258 | 258 | $configTable = new TableMetadata($table['table_name'], |
| 259 | - $this->config['database']['data_schema'], |
|
| 260 | - []); |
|
| 259 | + $this->config['database']['data_schema'], |
|
| 260 | + []); |
|
| 261 | 261 | |
| 262 | 262 | $currentTable = new AuditTable($this->io, |
| 263 | - $configTable, |
|
| 264 | - $this->config['database']['audit_schema'], |
|
| 265 | - $this->auditColumnsMetadata, |
|
| 266 | - '', |
|
| 267 | - ''); |
|
| 263 | + $configTable, |
|
| 264 | + $this->config['database']['audit_schema'], |
|
| 265 | + $this->auditColumnsMetadata, |
|
| 266 | + '', |
|
| 267 | + ''); |
|
| 268 | 268 | |
| 269 | 269 | $currentTable->dropAuditTriggers($this->config['database']['data_schema'], $table['table_name']); |
| 270 | 270 | } |