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

feat: db:table command #5979

Merged
merged 37 commits into from May 16, 2022
Merged

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented May 9, 2022

Description
Supersedes and closes #5895

Usage:
  db:table [<table_name>] [options]

Description:
  Retrieves information on the selected table.

Arguments:
  table_name  The table name to show info

Options:
  --show               Lists the names of all database tables.
  --metadata           Retrieves list containing field information.
  --desc               Sorts the table rows in DESC order.
  --limit-rows         Limits the number of rows. Default: 10.
  --limit-field-value  Limits the length of field values. Default: 15.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added the new feature PRs for new features label May 9, 2022
datamweb and others added 18 commits May 9, 2022 13:21
I do not know if this has been discussed before.
However, I sent the request.
If merged.
This command is simple, but practical.
This command displays the information in the table.
I will add options if it merged.
Ensure that boolean is assigned.
In phpunit testing, it could not get vaules.
--limit-fields -> --limit-column-length
--limit-column-length -> --limit-field-value
kenjis and others added 5 commits May 9, 2022 16:11
Some databases do not return nullable and primary key info.
Co-authored-by: Abdul Malik Ikhsan <samsonasik@gmail.com>
- remove unneeded `)`
- $item may be null, but cast to string here, because after all casted to string
<table_name> is optional.
@kenjis kenjis requested a review from paulbalandan May 9, 2022 10:07
user_guide_src/source/changelogs/v4.2.0.rst Outdated Show resolved Hide resolved
user_guide_src/source/database/examples.rst Outdated Show resolved Hide resolved
user_guide_src/source/database/examples.rst Outdated Show resolved Hide resolved
kenjis and others added 3 commits May 12, 2022 11:44
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
Co-authored-by: John Paul E. Balandan, CPA <51850998+paulbalandan@users.noreply.github.com>
@kenjis
Copy link
Member Author

kenjis commented May 12, 2022

I added a new page for Database Commands.

Copy link
Member

@paulbalandan paulbalandan left a comment

Choose a reason for hiding this comment

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

Sorry, I've been very busy this past weeks.

LGTM! Merge when ready.

@kenjis kenjis merged commit c93b967 into codeigniter4:develop May 16, 2022
@kenjis kenjis deleted the feat-db-table-command branch May 16, 2022 21:58
@kenjis
Copy link
Member Author

kenjis commented May 16, 2022

@paulbalandan No problem! Thank you for the review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature PRs for new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants