Change MySQL-Table Fields

55 views
Skip to first unread message

Tobias Müller

unread,
Dec 17, 2014, 1:19:00 PM12/17/14
to uf...@googlegroups.com
Is it possible to rename the MySQL-Database fields?

I'd really like to have them all lowercase, and I want to rename the table-name (want to add a prefix).
Am I asuming correctly that the table-fields are hardcoded? Can I change them and if, how?

Thanks in advance :D

Btw: Great Class, I really like it!

Tobias Müller

unread,
Dec 17, 2014, 1:20:04 PM12/17/14
to uf...@googlegroups.com
EDIT: Using v1.0 of the script

Pablo Tejada

unread,
Dec 17, 2014, 11:52:34 PM12/17/14
to uf...@googlegroups.com

Hey,

There is no easy way to change the table column names. You will have to do a search and replace for all table column names in the code. This is not recommended at all.

Why do you want have all fields lowercase?

In the other hand, having a custom table name is supported. The config option is userTableName.


--
Project's home page http://ptejada.com/projects/uFlex/
---
You received this message because you are subscribed to the Google Groups "uFlex" group.
To unsubscribe from this group and stop receiving emails from it, send an email to uflex+un...@googlegroups.com.
To post to this group, send email to uf...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/uflex/b401e9b0-ab47-4412-9abe-9d765330092d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tobias Müller

unread,
Dec 18, 2014, 4:38:29 AM12/18/14
to uf...@googlegroups.com
I do want to have them all lowercase because of multiple reasons, 
the main-reason is, that I plan a slightly larger project and want to fit all my tables a specific format.
It's just part of my "coding-style". Why is it not recommended? It should not harm the Class at all 
when I replace every single occurrence of the field names (except inside of strings of course).

But thanks for your reply, I'll think about it, and then decide if the risk is worth it.

And thanks for the awesome work with uFlex!

Eric Ellis

unread,
Dec 18, 2014, 6:39:05 AM12/18/14
to uf...@googlegroups.com

Perhaps a config array for that would be a good option?

Pablo Tejada

unread,
Dec 18, 2014, 8:18:40 AM12/18/14
to uf...@googlegroups.com
Tobias,

Is not recommended to modify the code because once you do you won't be able to update it from the main release, at least not with possible issues.

Eric,

The problem with adding such an option is that it will make the project more difficult to maintain and it will add overhead to every single operation.

Reply all
Reply to author
Forward
0 new messages