@@ -89,6 +89,11 @@ public static function getSupportedResources(): array
8989 Resource::TYPE_INDEX ,
9090 Resource::TYPE_ROW ,
9191
92+ // LEGACY
93+ Resource::TYPE_DOCUMENT ,
94+ Resource::TYPE_ATTRIBUTE ,
95+ Resource::TYPE_COLLECTION ,
96+
9297 // Storage
9398 Resource::TYPE_BUCKET ,
9499 Resource::TYPE_FILE ,
@@ -130,7 +135,7 @@ public function report(array $resources = []): array
130135 $ report [Resource::TYPE_DATABASE ] = 1 ;
131136 }
132137
133- if (\in_array (Resource::TYPE_TABLE , $ resources )) {
138+ if (Resource:: isSupported (Resource::TYPE_TABLE , $ resources )) {
134139 $ statement = $ db ->prepare ('SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = \'public \'' );
135140 $ statement ->execute ();
136141
@@ -141,7 +146,7 @@ public function report(array $resources = []): array
141146 $ report [Resource::TYPE_TABLE ] = $ statement ->fetchColumn ();
142147 }
143148
144- if (\in_array (Resource::TYPE_COLUMN , $ resources )) {
149+ if (Resource:: isSupported (Resource::TYPE_COLUMN , $ resources )) {
145150 $ statement = $ db ->prepare ('SELECT COUNT(*) FROM information_schema.columns WHERE table_schema = \'public \'' );
146151 $ statement ->execute ();
147152
@@ -163,7 +168,7 @@ public function report(array $resources = []): array
163168 $ report [Resource::TYPE_INDEX ] = $ statement ->fetchColumn ();
164169 }
165170
166- if (\in_array (Resource::TYPE_ROW , $ resources )) {
171+ if (Resource:: isSupported (Resource::TYPE_ROW , $ resources )) {
167172 $ statement = $ db ->prepare ('SELECT COUNT(*) FROM information_schema.tables WHERE table_schema = \'public \'' );
168173 $ statement ->execute ();
169174
@@ -295,7 +300,7 @@ protected function exportGroupDatabases(int $batchSize, array $resources): void
295300 }
296301
297302 try {
298- if (\in_array (Resource::TYPE_TABLE , $ resources )) {
303+ if (Resource:: isSupported (Resource::TYPE_TABLE , $ resources )) {
299304 $ this ->exportTables ($ batchSize );
300305 }
301306 } catch (\Throwable $ e ) {
@@ -311,7 +316,7 @@ protected function exportGroupDatabases(int $batchSize, array $resources): void
311316 }
312317
313318 try {
314- if (\in_array (Resource::TYPE_COLUMN , $ resources )) {
319+ if (Resource:: isSupported (Resource::TYPE_COLUMN , $ resources )) {
315320 $ this ->exportColumns ($ batchSize );
316321 }
317322 } catch (\Throwable $ e ) {
@@ -327,7 +332,7 @@ protected function exportGroupDatabases(int $batchSize, array $resources): void
327332 }
328333
329334 try {
330- if (\in_array (Resource::TYPE_ROW , $ resources )) {
335+ if (Resource:: isSupported (Resource::TYPE_ROW , $ resources )) {
331336 $ this ->exportRows ($ batchSize );
332337 }
333338 } catch (\Throwable $ e ) {
0 commit comments