EllisLab text mark
Advanced Search
     
extending the exp_members table
Posted: 26 November 2008 11:23 AM
Joined: 2003-07-11
280 posts

I am not enterely sure this post belongs here, but I’ll give it a try.

I am developing some code to integrate an ajax-chat into EE. For this purpose, I need to create 3 additional tables. One of them, ‘chatUsers’ is basically an extension of exp_members. This is how I set it up:

CREATE TABLE exp_chatUsers
(
userId INT(10) UNSIGNED NOT NULL,
role ENUM(‘AJAX_CHAT_GUEST’,‘AJAX_CHAT_SPEAKER’,‘AJAX_CHAT_USER’,‘AJAX_CHAT_MODERATOR’,‘AJAX_CHAT_ADMIN’) NOT NULL,
PRIMARY KEY (userId),
FOREIGN KEY (userId) REFERENCES exp_members (unique_id)
)
ENGINE = InnoDB;

I keep getting an error message “Can’t create table (errno 150)”. I have looked around, I just can’t find what might be wrong with this statement.  Does anyone have a suggestions?

-Franco

Moved to Howto by Moderator

 
Posted: 26 November 2008 12:08 PM   [ # 1 ]   [ Rating: 0 ]
Avatar
Joined: 2002-04-29
26055 posts

furghella, this is beyond the scope of EE technical support, I’m going to move it to HowTo.

 
Posted: 26 November 2008 12:16 PM   [ # 2 ]   [ Rating: 0 ]
Avatar
Joined: 2006-04-15
12649 posts

Hi Franco,

Where exactly are you running the SQL you have shown above to create the table? Are you using PHPMyAdmin or something else?

Best wishes,

Mark

 Signature 

Shopping Cart Plugin | Full List Of Add-Ons | About Me
——————————————————————————————
2.x Bug Tracker | Upgrade Errors