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