the question says it all it think 🙂
What is the best way to execute a query such as:
ALTER TABLE tablename AUTO_INCREMENT = 1;
using Doctrine?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You’ll have to just execute the query as normal from within the PHP I’m afraid, as this is not something that Doctrine supports.
Note that if you run
ALTER TABLE tablename AUTO_INCREMENT = 1;then the next value will be the highest currently in the table + 1. You aren’t explicitly setting the value to 1 if there are already records in the table.