Site Links
Home
Features
Documentation
Pricing & Order
Members Area
Support Options
UBBDev.com
UBBWiki.com
Who's Online Now
2 registered members (M4TT, mmkk), 65 guests, and 268 spiders.
Key: Admin, Global Mod, Mod
Member Spotlight
isaac
isaac
California
Posts: 1,004
Joined: April 2004
Show All Member Profiles 
Top Posters(30 Days)
Gizmo 15
FREAK 11
M4TT 10
Ruben 5
mmkk 5
isaac 4
Latest Photos
Chinese Buddhist temple.
My buddha beads.
Rendered Walls
Multi-Screen wallpaper
Stockholm Metro
Previous Thread
Next Thread
Print Thread
When you create modifications.... #177255
02/03/07 01:31 PM
02/03/07 01:31 PM
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
R
Rick Offline OP
Former Developer
Rick  Offline OP
Former Developer
R
Joined: Jun 2006
Posts: 10,177
Aberdeen, WA
Not exactly sure the best place to post this yet, but I'll post here for now.

For all of you modders out there. This is something that I stressed in earlier versions, but we'll revisit it again. Take a look at this thread.

A modification that was installed altered the database. The problem was, that the field names that were chosen for this modification were ones that we used for 7.1, so it ended up resulting in upgrade problems.

When creating a modification that alters the database, please give the new fields a custom prefix. In this case, instead of ONLINE_AGENT, use something like CUSTOM_ONLINE_AGENT. Just something that is different than the normal field naming convention. That way if future upgrades try to add a new field, there will be no conflicts.

Express Hosting
Express Hosting "We are the official hosting company of UBB.threads. Ask us about our free migration services to migrate your UBB.threads installation."
Re: When you create modifications.... [Re: Rick] #177357
02/03/07 06:12 PM
02/03/07 06:12 PM
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
Gizmo Offline
UBB.threads Developer
Gizmo  Offline
UBB.threads Developer
Joined: Jun 2006
Posts: 16,785
Portland, OR; USA
I agree here completely, your mod shouldn't use current variables, you should create new ones as to not break things should a user decide to upgrade; plus it'd be near impossible to find what is needed to uninstall a mod with using pre-existing variables so users would end up with content not needed...


I am a Web Development Contractor, I do not work for UBBCentral. I have provided free User to User Support since the beginning of these support forums.
Forums: A Gardeners Forum Scouters World
UBB.threads: UBBWiki, UBB Styles, UBB.Sitemaps
Longtime Supporter & Resident Post-A-Holic
VNC Web Services: Code Modifications, Upgrades, Styling, Coding Services, Disaster Recovery, and more!
Re: When you create modifications.... [Re: Gizmo] #177379
02/03/07 07:42 PM
02/03/07 07:42 PM
Joined: Aug 2006
Posts: 1,942
NJ
jgeoff Offline
Pooh-Bah
jgeoff  Offline
Pooh-Bah
Joined: Aug 2006
Posts: 1,942
NJ

Someone should post this to ubbDev, too...



GangsterBB.NET (Ver. 7.5.8)
2007 Content Rulez Contest - Hon Mention
UBB.classic 6.7.2 - RIP
Browsers: Chrome, Firefox, & Safari (Win7 and iPhone); No IE, ever!
Re: When you create modifications.... [Re: jgeoff] #188951
06/26/07 09:23 PM
06/26/07 09:23 PM
Joined: Jun 2006
Posts: 472
So. California
Mors Offline
addict
Mors  Offline
addict
Joined: Jun 2006
Posts: 472
So. California
You should use the best practice of NEVER touching the original products data model.. Create your own tables and field names..


Happy Customer !!!
Re: When you create modifications.... [Re: Mors] #235403
03/06/10 04:24 PM
03/06/10 04:24 PM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
i go one step further and create a new database.. the mysql class isn't married to a particular database, so you can do cross DB joins with no code changes at all to the sql class..

Basically, select queries can look like:

SQL Query
SELECT my.FieldName, my.user_id, u.USER_ID
FROM $myDB.TableName my, {$config['TABLE_PREFIX']}USERS u
WHERE my.user_id=u.USER_ID


kinda stuff.. the only thing you have to make sure of is that the DB user and DB pass can connect to both DBs (duh) and the query is just as efficient as a intra table join within the same DB..

i stumbled upon it via google about 5yrs ago Linky Poo™

2c

Re: When you create modifications.... [Re: SD] #235431
03/09/10 03:08 AM
03/09/10 03:08 AM
Joined: Aug 2006
Posts: 1,530
Breda, NL
Yarp™ Offline
veteran
Yarp™  Offline
veteran
Joined: Aug 2006
Posts: 1,530
Breda, NL
Originally Posted by Sirdude
i go one step further and create a new database..


I don't, often my mods enhance existing tables, if I would add more tables to the equision, I would need to add extra tables to the query mix, and would loose a little performance.


[Linked Image]
Re: When you create modifications.... [Re: Yarp™] #235432
03/09/10 05:15 AM
03/09/10 05:15 AM
Joined: Apr 2007
Posts: 4,313
SoCal, USA
SD Offline
Carpal Tunnel
SD  Offline
Carpal Tunnel
Joined: Apr 2007
Posts: 4,313
SoCal, USA
To each their own.. the performance hit is negligible, imo..

You actually get a HUGE performance increase, depending upon what you are doing..

Example is to split the ubbt_POSTS table up into 2.. 1 ubbt_posts_archive is in another DB (for archived posts) then the normal ubbt_POSTS table stays as is.

Modify ubbt_TOPICS to then have TOPIC_STATUS include a new type 'A' for archive..

then in normal day to day operations, the ubbt_POSTS table is being queried with MUCH less records to retrieve for cfrm and postlist..

only time you would hit up the ubbt_posts_archive table would be for searching or showflat (if archive)..

it's like night/day in performance increase smile

so i see your point, and believe your example holds for things like extra field in ubbt_USER_PROFILE or whatever.. but there are really quite a few tables where splitting them off would actually increase the speed..

so i guess we agree in some way too laugh


Shout Box
Today's Birthdays
No Birthdays
Recent Topics
Shout Box Sound Effect
by M4TT. 11/29/17 08:28 PM
Ad island
by TGCsanderson. 11/25/17 06:41 PM
Taking to long to connect to DB
by AstroCat. 11/24/17 12:34 PM
I want to update forum but can't find license
by dimaninc. 11/23/17 10:51 AM
Forum Statistics
Forums36
Topics35,014
Posts190,533
Members12,045
Most Online978
Jun 24th, 2007
Random Image
Powered by UBB.threads™ PHP Forum Software 7.6.1
(Snapshot build 20171106)