- Issue created by @dinarcon
- Merge request !1Issue #3487892: Get current auto_increament value of the table → (Merged) created by gaurav_manerkar
- 🇳🇮Nicaragua dinarcon
Thanks for working on this @gaurav_manerkar I have rebased the MR to resolve conflicts introduced in recent commits.
I tested the MR and it works, but let's make make some improvements. I don't think we need to worry about adding prefixes or not to tables. Now that ✨ Get a list of all tables Active has landed, people can use that method to check for tables as they exist, prefix included when present.
Also, while not explicitly stated in the issue summary, the query you added to fetch the AUTO_INCREMENT can be adjusted to get the values for all tables. Let's include that in this issue.
I will take a first shot at this. Assigning to myself.
- 🇳🇮Nicaragua dinarcon
Pushed an update to
getTableAutoIncrementValue
method and a newgetAllTableAutoIncrementValues
method.Please review.
- First commit to issue fork.
- 🇳🇮Nicaragua baltowen
I tested the MR with the following commands. I also updated the readme file.
drush php:eval "\Drupal::service('auto_increment_alter.mysql')->getTableAutoIncrementValue('node');" drush php:eval "print_r(\Drupal::service('auto_increment_alter.mysql')->getAllTableAutoIncrementValues());" drush php:eval "print_r(\Drupal::service('auto_increment_alter.mysql')->getAllTableAutoIncrementValues(FALSE));"
-
dinarcon →
committed e9e050d0 on 1.0.x authored by
gaurav_manerkar →
Issue #3487892 by gaurav_manerkar, dinarcon, baltowen: Get the current...
-
dinarcon →
committed e9e050d0 on 1.0.x authored by
gaurav_manerkar →
- 🇳🇮Nicaragua dinarcon
Thanks @baltowen and @gaurav_manerkar for working on this. Updating issue summary to reflect the two new methods added to the service.
Automatically closed - issue fixed for 2 weeks with no activity.