@@ 609-625 (lines=17) @@ | ||
606 | /** |
|
607 | * @inheritdoc |
|
608 | */ |
|
609 | public function deleteColumn($name, $table) |
|
610 | { |
|
611 | $tableGateway = $this->getTableGateway($table); |
|
612 | $success = $tableGateway->dropColumn($name); |
|
613 | ||
614 | $response = [ |
|
615 | 'success' => (bool) $success |
|
616 | ]; |
|
617 | ||
618 | if (!$success) { |
|
619 | $response['error'] = [ |
|
620 | 'message' => sprintf('unable_to_remove_column_%s', ['column_name' => $name]) |
|
621 | ]; |
|
622 | } |
|
623 | ||
624 | return $this->createResponseFromData($response); |
|
625 | } |
|
626 | ||
627 | /** |
|
628 | * @inheritdoc |
|
@@ 638-654 (lines=17) @@ | ||
635 | /** |
|
636 | * @inheritdoc |
|
637 | */ |
|
638 | public function deleteTable($name) |
|
639 | { |
|
640 | $tableGateway = $this->getTableGateway($name); |
|
641 | $success = $tableGateway->drop(); |
|
642 | ||
643 | $response = [ |
|
644 | 'success' => (bool) $success |
|
645 | ]; |
|
646 | ||
647 | if (!$success) { |
|
648 | $response['error'] = [ |
|
649 | 'message' => sprintf('unable_to_remove_table_%s', ['table_name' => $name]) |
|
650 | ]; |
|
651 | } |
|
652 | ||
653 | return $this->createResponseFromData($response); |
|
654 | } |
|
655 | ||
656 | public function getActivity(array $params = []) |
|
657 | { |