I am creating a standalone application and a central server, both use common database schema. Central server is attached and managed with joomla3.x UX.

Since any user can register through offline standalone application and whenever their is net connectivity goes up,data will be synchronized. So to remove data redundancy I am creating unique user_id as varchar. But joomla #_user table takes it as id int auto-increment.

  • 1
    Whatever you do, DO NOT change the ID column from INT to VARCHAR. This column is used as the primary key and is auto incremented. In addition to this, it will also cause problems when ordering (by id) data from this column. I'd suggest re-thinking your syncing process – Lodder Mar 7 '17 at 11:29

This is actually a pure MySQL question which should be titled "How to Alter a MySQL column". There is nothing different or special if the database is used for a Joomla site.

So simply to have this part of the question answered, a SQL statement like below would do it:


On another note, of course there is nothing in Joomla that provides the option to alter its database schemas.

Also this is not recommended. Altering the db schemas of another application that you don't control and you depend on its updates etc doesn't make real sense. Future updates may override these changes.

Also I haven't review the user creation code, but it's very likely the ids to depend solely on the MySQL auto-increment function. If you disable this, you may open the door to issues and malfunction.

To be honest from your question I haven't understand what you are trying to do and the reasons why you want to change the #__users.id column.

But since the other application is currently being built by you, why won't you adjust your application's id field?

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.