| @@ 652-668 (lines=17) @@ | ||
| 649 | /** |
|
| 650 | * @inheritdoc |
|
| 651 | */ |
|
| 652 | public function deleteColumn($name, $table) |
|
| 653 | { |
|
| 654 | $tableGateway = $this->getTableGateway($table); |
|
| 655 | $success = $tableGateway->dropColumn($name); |
|
| 656 | ||
| 657 | $response = [ |
|
| 658 | 'success' => (bool) $success |
|
| 659 | ]; |
|
| 660 | ||
| 661 | if (!$success) { |
|
| 662 | $response['error'] = [ |
|
| 663 | 'message' => sprintf('unable_to_remove_column_%s', ['column_name' => $name]) |
|
| 664 | ]; |
|
| 665 | } |
|
| 666 | ||
| 667 | return $this->createResponseFromData($response); |
|
| 668 | } |
|
| 669 | ||
| 670 | /** |
|
| 671 | * @inheritdoc |
|
| @@ 681-697 (lines=17) @@ | ||
| 678 | /** |
|
| 679 | * @inheritdoc |
|
| 680 | */ |
|
| 681 | public function deleteTable($name) |
|
| 682 | { |
|
| 683 | $tableGateway = $this->getTableGateway($name); |
|
| 684 | $success = $tableGateway->drop(); |
|
| 685 | ||
| 686 | $response = [ |
|
| 687 | 'success' => (bool) $success |
|
| 688 | ]; |
|
| 689 | ||
| 690 | if (!$success) { |
|
| 691 | $response['error'] = [ |
|
| 692 | 'message' => sprintf('unable_to_remove_table_%s', ['table_name' => $name]) |
|
| 693 | ]; |
|
| 694 | } |
|
| 695 | ||
| 696 | return $this->createResponseFromData($response); |
|
| 697 | } |
|
| 698 | ||
| 699 | public function getActivity(array $params = []) |
|
| 700 | { |
|