can i add new field into sql user table without issue ?

can i add new field into sql user table without issue ?

by REMI PICARD (substitute) -
Number of replies: 2

hi,


i need to add several fields into the user table. i can't use the custom profile field because the feature is missing several options i need. so i will add them into sql and manage the acess/write with another php mvc framework.

these fields will not have any interaction with moodle application at all, nothing, only with an external application. Theses fields will have unique field names.

Will moodle detect these new fields and produce any error or issue in the web moodle side or will they be ignored ?

is there any possibility an update can delete/erase them without notification  ?

If you have already perform such action and have experience with a php framework too, any information would be useful!


Thank you for your advices.

Average of ratings: -
In reply to REMI PICARD (substitute)

Re: can i add new field into sql user table without issue ?

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
Well, *I* wouldn't.

We talk about not modifying core Moodle code but not modifying core Moodle tables is the same thing. When you come to do an upgrade what happens if your site breaks horribly?

I would seek a more elegant solution. I start by thinking, "how can I solve this by writing a proper Moodle plugin?". There's almost always a way.
Average of ratings: Useful (1)
In reply to REMI PICARD (substitute)

Re: can i add new field into sql user table without issue ?

by Luis de Vasconcelos -
Picture of Particularly helpful Moodlers
Would you change the pipes and tubes in the engine of your car? Probably not, so I wouldn't do it in Moodle either.

Changing any of the Moodle core tables could cause problems in the future when you try to upgrade Moodle.

So the best solution would really be to find a way to do what you want using a plugin. That plugin could define it's own database tables which you can do what you want with.
Average of ratings: Useful (2)