@@ 585-601 (lines=17) @@ | ||
582 | /** |
|
583 | * @inheritdoc |
|
584 | */ |
|
585 | public function deleteColumn($name, $table) |
|
586 | { |
|
587 | $tableGateway = $this->getTableGateway($table); |
|
588 | $success = $tableGateway->dropColumn($name); |
|
589 | ||
590 | $response = [ |
|
591 | 'success' => (bool) $success |
|
592 | ]; |
|
593 | ||
594 | if (!$success) { |
|
595 | $response['error'] = [ |
|
596 | 'message' => sprintf('unable_to_remove_column_%s', ['column_name' => $name]) |
|
597 | ]; |
|
598 | } |
|
599 | ||
600 | return $this->createResponseFromData($response); |
|
601 | } |
|
602 | ||
603 | /** |
|
604 | * @inheritdoc |
|
@@ 614-630 (lines=17) @@ | ||
611 | /** |
|
612 | * @inheritdoc |
|
613 | */ |
|
614 | public function deleteTable($name) |
|
615 | { |
|
616 | $tableGateway = $this->getTableGateway($name); |
|
617 | $success = $tableGateway->drop(); |
|
618 | ||
619 | $response = [ |
|
620 | 'success' => (bool) $success |
|
621 | ]; |
|
622 | ||
623 | if (!$success) { |
|
624 | $response['error'] = [ |
|
625 | 'message' => sprintf('unable_to_remove_table_%s', ['table_name' => $name]) |
|
626 | ]; |
|
627 | } |
|
628 | ||
629 | return $this->createResponseFromData($response); |
|
630 | } |
|
631 | ||
632 | public function getActivity(array $params = []) |
|
633 | { |