collapse collapse
* User Info
 
 
Welcome, Guest. Please login or register.
* Search

* Board Stats
  • stats Total Members: 989
  • stats Total Posts: 18363
  • stats Total Topics: 2500
  • stats Total Categories: 7
  • stats Total Boards: 35
  • stats Most Online: 1144

Author Topic: Add a primary key to admin_members  (Read 1894 times)

0 Members and 1 Guest are viewing this topic.

Offline Glarawyn

  • BeBot Hero
  • ******
  • Posts: 521
  • Karma: +0/-0
Add a primary key to admin_members
« on: August 25, 2006, 07:27:45 pm »
ALTER TABLE admin_members ADD PRIMARY KEY (name, admin_group);

This creates a composite primary key, forcing all parings of a name and group number to be unique. So Glarawyn cannot be a member of group 1 multiple times, but Glarawyn can be a member of group 1 and 2.

This change doesn't really change anything; it just prevents possibly annoying duplication. Also, admin_members looks to be the only default table without a primary key set, which I just don’t get because there is a primary key right there without adding extra data. :)

Offline Khalem

  • BeBot Founder
  • Administrator
  • ********
  • Posts: 1169
  • Karma: +0/-0
    • http://www.ancarim.com
Re: Add a primary key to admin_members
« Reply #1 on: August 26, 2006, 02:37:47 am »
I'm just gonna leave this as is for 0.2.x, however it will be fixed in 0.3/0.4 as the table gets migrated to groups instead of admin_groups.
I'm gonna separate the two in the database, however i'll likely still let them have a shared end user interface, ie !admin
BeBot Founder and Fixer Kingpin

 

* Recent Posts
[AoC] special char for items module by bitnykk
[February 09, 2024, 09:41:18 pm]


0.8.x updates for AoC by bitnykk
[January 30, 2024, 11:16:08 pm]


0.8.x updates for AO by bitnykk
[January 30, 2024, 11:15:37 pm]


BeBot still alive & kicking ! by bitnykk
[December 17, 2023, 12:58:44 am]


Bebot and Rasberry by bitnykk
[November 29, 2023, 11:04:14 pm]

* Who's Online
  • Dot Guests: 670
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.
* Forum Staff
bitnykk admin bitnykk
Administrator
Khalem admin Khalem
Administrator
WeZoN gmod WeZoN
Global Moderator
SimplePortal 2.3.7 © 2008-2024, SimplePortal