Raised This Month: $51 Target: $400
 12% 

Is it safe to change the sourcemod database schema?


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
temp321
Junior Member
Join Date: Oct 2010
Old 10-05-2010 , 22:47   Is it safe to change the sourcemod database schema?
Reply With Quote #1

I am wondering if it is safe to change the schema of the sm_admins database.

Specifically I want to change the "identity" column to be "unique". Is there any harm in doing this? And if not, why isn't it the default?
temp321 is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 10-05-2010 , 23:57   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #2

A better question is, why do you want to do it?
__________________
Xsinthis is offline
temp321
Junior Member
Join Date: Oct 2010
Old 10-06-2010 , 14:57   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #3

I want to do it so I can interface with my donation system.

INSERT ON DUPLICATE KEY doesn't work properly unless identity is unique.
temp321 is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 10-06-2010 , 15:21   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #4

Ahhh well then why not backup your database, and then try the change out and tell us how it works?
__________________
Xsinthis is offline
temp321
Junior Member
Join Date: Oct 2010
Old 10-06-2010 , 16:25   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #5

It'll probably work short term, but if sourcemod decides to change the schema in the future, then it might mess up the database.
temp321 is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 10-06-2010 , 17:10   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #6

Haha i didn't realize that it needs to be unique, even though my plugin uses the INSERT ON DUPLICATE KEY query :/
__________________
Xsinthis is offline
temp321
Junior Member
Join Date: Oct 2010
Old 10-06-2010 , 17:34   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #7

Yep, you need it to be unique unless you are inserting by ID.

since "identity" isn't unique, it is possible to have 2 entries like this.

ID IDENTITY IMMUNITY
1. STEAM:1234 0
2. STEAM:1234 99

And it makes no sense. I'm hoping that one of the sourcemod developers will see this and change it.
temp321 is offline
YamiKaitou
Has a lovely bunch of coconuts
Join Date: Apr 2006
Location: Texas
Old 10-06-2010 , 18:39   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #8

Quote:
Originally Posted by temp321 View Post
I'm hoping that one of the sourcemod developers will see this and change it.
Submit a bug report if you want them to see it
__________________
ProjectYami Laboratories

I do not browse the forums regularly anymore. If you need me for anything (asking questions or anything else), then PM me (be descriptive in your PM, message containing only a link to a thread will be ignored).
YamiKaitou is offline
Xsinthis
Senior Member
Join Date: Oct 2008
Location: Canadia, eh?
Old 10-07-2010 , 12:23   Re: Is it safe to change the sourcemod database schema?
Reply With Quote #9

https://bugs.alliedmods.net/show_bug.cgi?id=4651
__________________
Xsinthis is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 19:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode