Skip to content

PHPORM-214 Implement Schema\Builder::getTables #3044

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

Merged
merged 2 commits into from
Jul 15, 2024
Merged

Conversation

GromNaN
Copy link
Member

@GromNaN GromNaN commented Jul 15, 2024

Fix PHPORM-214

This method is used by the command db:show.

Example of output:

 php artisan db:show -vvv

   .............................................................................................. 7.0.11  
  Database ..................................................................................... laravel  
  Host .................................................................................................  
  Port .................................................................................................  
  Username .............................................................................................  
  URL ..................................................................................................  
  Open Connections .....................................................................................  
  Tables ............................................................................................ 19  
  Total Size ................................................................................. 268.00 KB  

  Table ........................................................................................... Size  
  admin_menu  .................................................................................. 8.00 KB  
  admin_operation_log  ........................................................................ 12.00 KB  
  admin_permissions  .......................................................................... 16.00 KB  
  admin_role_menu  ............................................................................ 12.00 KB  
  admin_role_permissions  ..................................................................... 12.00 KB  
  admin_role_users  ........................................................................... 12.00 KB  
  admin_roles  ................................................................................ 16.00 KB  
  admin_user_permissions  ..................................................................... 12.00 KB  
  admin_users  ................................................................................ 12.00 KB  
  cache  ...................................................................................... 12.00 KB  
  cache_locks  ................................................................................ 12.00 KB  
  failed_jobs  ................................................................................ 12.00 KB  
  job_batches  ................................................................................ 12.00 KB  
  jobs  ....................................................................................... 12.00 KB  
  migrations  ................................................................................. 40.00 KB  
  password_reset_tokens  ...................................................................... 12.00 KB  
  personal_access_tokens  ..................................................................... 16.00 KB  
  sessions  ................................................................................... 16.00 KB  
  users  ...................................................................................... 12.00 KB  


Checklist

  • Add tests and ensure they pass
  • Add an entry to the CHANGELOG.md file
  • Update documentation for new features

@GromNaN GromNaN marked this pull request as ready for review July 15, 2024 12:07
@GromNaN GromNaN requested a review from a team as a code owner July 15, 2024 12:07
@GromNaN GromNaN requested a review from alcaeus July 15, 2024 12:07

foreach ($db->listCollections() as $collectionInfos) {
$stats = $db->selectCollection($collectionInfos->getName())->aggregate([
['$collStats' => ['storageStats' => ['scale' => 1]]],
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the aggregation because the command is deprecated.

@GromNaN GromNaN requested a review from alcaeus July 15, 2024 12:29
@GromNaN GromNaN merged commit 256a830 into mongodb:4.7 Jul 15, 2024
26 checks passed
@GromNaN GromNaN deleted the PHPORM-214 branch July 15, 2024 13:10
@GromNaN GromNaN added this to the 4.7 milestone Jul 19, 2024
rustagir pushed a commit to rustagir/laravel-mongodb that referenced this pull request Jul 23, 2024
rustagir pushed a commit to rustagir/laravel-mongodb that referenced this pull request Jul 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants