Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUGFIX] Remove table.clear update type #396

Merged
merged 1 commit into from
Jan 11, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 0 additions & 1 deletion Classes/Command/DatabaseCommandController.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ class DatabaseCommandController extends CommandController
* - table.change
* - table.prefix
* - table.drop
* - table.clear
* - safe (includes all necessary operations, to add or change fields or tables)
* - destructive (includes all operations which rename or drop fields or tables)
*
Expand Down
1 change: 0 additions & 1 deletion Classes/Database/Schema/SchemaUpdateResultRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ class SchemaUpdateResultRenderer
SchemaUpdateType::FIELD_DROP => 'Drop fields',
SchemaUpdateType::TABLE_ADD => 'Add tables',
SchemaUpdateType::TABLE_CHANGE => 'Change tables',
SchemaUpdateType::TABLE_CLEAR => 'Clear tables',
SchemaUpdateType::TABLE_PREFIX => 'Prefix tables',
SchemaUpdateType::TABLE_DROP => 'Drop tables',
];
Expand Down
8 changes: 0 additions & 8 deletions Classes/Database/Schema/SchemaUpdateType.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ class SchemaUpdateType extends Enumeration
*/
const TABLE_DROP = 'table.drop';

/**
* Truncate a table
*/
const TABLE_CLEAR = 'table.clear';

/**
* All safe update types
*/
Expand All @@ -88,15 +83,13 @@ class SchemaUpdateType extends Enumeration
self::FIELD_DROP => ['drop' => self::GROUP_DESTRUCTIVE],
self::TABLE_ADD => ['create_table' => self::GROUP_SAFE],
self::TABLE_CHANGE => ['change_table' => self::GROUP_SAFE],
self::TABLE_CLEAR => ['clear_table' => self::GROUP_SAFE],
self::TABLE_PREFIX => ['change_table' => self::GROUP_DESTRUCTIVE],
self::TABLE_DROP => ['drop_table' => self::GROUP_DESTRUCTIVE],
self::GROUP_SAFE => [
self::FIELD_ADD,
self::FIELD_CHANGE,
self::TABLE_ADD,
self::TABLE_CHANGE,
self::TABLE_CLEAR,
],
self::GROUP_DESTRUCTIVE => [
self::FIELD_PREFIX,
Expand All @@ -113,7 +106,6 @@ class SchemaUpdateType extends Enumeration
self::TABLE_CHANGE,
self::TABLE_PREFIX,
self::TABLE_DROP,
self::TABLE_CLEAR,
],
];

Expand Down
3 changes: 1 addition & 2 deletions Documentation/CommandReference/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Command Reference
in the binary directory specified in the root composer.json (by default ``vendor/bin``)


The following reference was automatically generated from code on 2016-12-21 23:39:26
The following reference was automatically generated from code on 2017-01-12 00:08:42


.. _`Command Reference: typo3_console`:
Expand Down Expand Up @@ -473,7 +473,6 @@ Valid schema update types are:
- table.change
- table.prefix
- table.drop
- table.clear
- safe (includes all necessary operations, to add or change fields or tables)
- destructive (includes all operations which rename or drop fields or tables)

Expand Down
10 changes: 0 additions & 10 deletions Tests/Unit/Database/Schema/SchemaUpdateTypeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ public function expandTypesExpandsCorrectlyDataProvider()
'table.change',
'table.prefix',
'table.drop',
'table.clear',
]
],
'all double' => [
Expand All @@ -52,7 +51,6 @@ public function expandTypesExpandsCorrectlyDataProvider()
'table.change',
'table.prefix',
'table.drop',
'table.clear',
]
],
'fields' => [
Expand All @@ -71,7 +69,6 @@ public function expandTypesExpandsCorrectlyDataProvider()
'table.change',
'table.prefix',
'table.drop',
'table.clear',
]
],
'all add' => [
Expand Down Expand Up @@ -102,20 +99,13 @@ public function expandTypesExpandsCorrectlyDataProvider()
'table.drop',
]
],
'all clear' => [
['*.clear'],
[
'table.clear',
]
],
'all safe' => [
['safe'],
[
'field.add',
'field.change',
'table.add',
'table.change',
'table.clear',
]
],
'all destructive' => [
Expand Down