@@ 634-650 (lines=17) @@ | ||
631 | /** |
|
632 | * @inheritdoc |
|
633 | */ |
|
634 | public function deleteColumn($name, $table) |
|
635 | { |
|
636 | $tableGateway = $this->getTableGateway($table); |
|
637 | $success = $tableGateway->dropColumn($name); |
|
638 | ||
639 | $response = [ |
|
640 | 'success' => (bool) $success |
|
641 | ]; |
|
642 | ||
643 | if (!$success) { |
|
644 | $response['error'] = [ |
|
645 | 'message' => sprintf('unable_to_remove_column_%s', ['column_name' => $name]) |
|
646 | ]; |
|
647 | } |
|
648 | ||
649 | return $this->createResponseFromData($response); |
|
650 | } |
|
651 | ||
652 | /** |
|
653 | * @inheritdoc |
|
@@ 663-679 (lines=17) @@ | ||
660 | /** |
|
661 | * @inheritdoc |
|
662 | */ |
|
663 | public function deleteTable($name) |
|
664 | { |
|
665 | $tableGateway = $this->getTableGateway($name); |
|
666 | $success = $tableGateway->drop(); |
|
667 | ||
668 | $response = [ |
|
669 | 'success' => (bool) $success |
|
670 | ]; |
|
671 | ||
672 | if (!$success) { |
|
673 | $response['error'] = [ |
|
674 | 'message' => sprintf('unable_to_remove_table_%s', ['table_name' => $name]) |
|
675 | ]; |
|
676 | } |
|
677 | ||
678 | return $this->createResponseFromData($response); |
|
679 | } |
|
680 | ||
681 | public function getActivity(array $params = []) |
|
682 | { |