@@ -21,10 +21,10 @@ discard block |
||
| 21 | 21 | protected function configure() |
| 22 | 22 | { |
| 23 | 23 | $this->setName('drop-triggers') |
| 24 | - ->setDescription('Drops all triggers') |
|
| 25 | - ->setHelp('Drops all triggers (including triggers not created by audit) from all tables (including tables '. |
|
| 26 | - 'excluded for auditing) in the data schema.') |
|
| 27 | - ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 24 | + ->setDescription('Drops all triggers') |
|
| 25 | + ->setHelp('Drops all triggers (including triggers not created by audit) from all tables (including tables '. |
|
| 26 | + 'excluded for auditing) in the data schema.') |
|
| 27 | + ->addArgument('config file', InputArgument::REQUIRED, 'The audit configuration file'); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -59,8 +59,8 @@ discard block |
||
| 59 | 59 | foreach ($triggers as $trigger) |
| 60 | 60 | { |
| 61 | 61 | $this->io->logInfo('Dropping trigger <dbo>%s</dbo> from table <dbo>%s</dbo>', |
| 62 | - $trigger['trigger_name'], |
|
| 63 | - $trigger['table_name']); |
|
| 62 | + $trigger['trigger_name'], |
|
| 63 | + $trigger['table_name']); |
|
| 64 | 64 | |
| 65 | 65 | AuditDataLayer::dropTrigger($dataSchema, $trigger['trigger_name']); |
| 66 | 66 | } |
@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | |
| 66 | 66 | $this->additionalAuditColumns = |
| 67 | 67 | AuditDataLayer::resolveCanonicalAdditionalAuditColumns($this->config->getManString('database.audit_schema'), |
| 68 | - $this->config->getManArray('audit_columns')); |
|
| 68 | + $this->config->getManArray('audit_columns')); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -160,12 +160,12 @@ discard block |
||
| 160 | 160 | if ($this->config->getManBool('tables.'.$table['table_name'].'.audit')) |
| 161 | 161 | { |
| 162 | 162 | $currentTable = new AuditTable($this->io, |
| 163 | - $this->config->getManString('database.data_schema'), |
|
| 164 | - $this->config->getManString('database.audit_schema'), |
|
| 165 | - $table['table_name'], |
|
| 166 | - $this->additionalAuditColumns, |
|
| 167 | - $this->config->getOptString('tables.'.$table['table_name'].'.alias'), |
|
| 168 | - $this->config->getOptString('tables.'.$table['table_name'].'.skip')); |
|
| 163 | + $this->config->getManString('database.data_schema'), |
|
| 164 | + $this->config->getManString('database.audit_schema'), |
|
| 165 | + $table['table_name'], |
|
| 166 | + $this->additionalAuditColumns, |
|
| 167 | + $this->config->getOptString('tables.'.$table['table_name'].'.alias'), |
|
| 168 | + $this->config->getOptString('tables.'.$table['table_name'].'.skip')); |
|
| 169 | 169 | |
| 170 | 170 | // Ensure the audit table exists. |
| 171 | 171 | if (RowSetHelper::searchInRowSet($this->auditSchemaTables, 'table_name', $table['table_name'])===null) |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | |
| 51 | 51 | $this->additionalAuditColumns = |
| 52 | 52 | AuditDataLayer::resolveCanonicalAdditionalAuditColumns($this->config->getManString('database.audit_schema'), |
| 53 | - $this->config->getManArray('audit_columns')); |
|
| 53 | + $this->config->getManArray('audit_columns')); |
|
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | //-------------------------------------------------------------------------------------------------------------------- |
@@ -105,8 +105,8 @@ discard block |
||
| 105 | 105 | $maxLength = $diff->getLongestColumnNameLength(); |
| 106 | 106 | |
| 107 | 107 | $this->codeStore->append(sprintf('alter table `%s`.`%s`', |
| 108 | - $this->config->getManString('database.audit_schema'), |
|
| 109 | - $auditTable->getTableName())); |
|
| 108 | + $this->config->getManString('database.audit_schema'), |
|
| 109 | + $auditTable->getTableName())); |
|
| 110 | 110 | |
| 111 | 111 | $first = true; |
| 112 | 112 | foreach ($diff->getColumns() as $column) |
@@ -117,11 +117,11 @@ discard block |
||
| 117 | 117 | if (!$first) $this->codeStore->appendToLastLine(','); |
| 118 | 118 | |
| 119 | 119 | $this->codeStore->append(sprintf('change column `%s`%s`%s`%s%s', |
| 120 | - $name, |
|
| 121 | - $filler, |
|
| 122 | - $name, |
|
| 123 | - $filler, |
|
| 124 | - $column->getColumnAuditDefinition())); |
|
| 120 | + $name, |
|
| 121 | + $filler, |
|
| 122 | + $name, |
|
| 123 | + $filler, |
|
| 124 | + $column->getColumnAuditDefinition())); |
|
| 125 | 125 | |
| 126 | 126 | $first = false; |
| 127 | 127 | } |
@@ -167,9 +167,9 @@ discard block |
||
| 167 | 167 | } |
| 168 | 168 | |
| 169 | 169 | $this->codeStore->append(sprintf('alter table `%s`.`%s` %s;', |
| 170 | - $this->config->getManString('database.audit_schema'), |
|
| 171 | - $auditTable->getTableName(), |
|
| 172 | - implode(' ', $parts))); |
|
| 170 | + $this->config->getManString('database.audit_schema'), |
|
| 171 | + $auditTable->getTableName(), |
|
| 172 | + implode(' ', $parts))); |
|
| 173 | 173 | $this->codeStore->append(''); |
| 174 | 174 | } |
| 175 | 175 | } |
@@ -72,7 +72,7 @@ |
||
| 72 | 72 | |
| 73 | 73 | $this->additionalAuditColumns = |
| 74 | 74 | AuditDataLayer::resolveCanonicalAdditionalAuditColumns($this->config->getManString('database.audit_schema'), |
| 75 | - $this->config->getManArray('audit_columns')); |
|
| 75 | + $this->config->getManArray('audit_columns')); |
|
| 76 | 76 | } |
| 77 | 77 | |
| 78 | 78 | //-------------------------------------------------------------------------------------------------------------------- |