• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!
  • 2026 staff recruitment is open! Check it out and consider applying!

Modern AAC problem

whipxz

New Member
Joined
Jul 23, 2011
Messages
11
Reaction score
0
Ive been trying to make the modern aac work, but i get this error where it says cannot find the poll_votes table.
So ive been searching and been trying all kinds of SQL scripts giving.

So i found a sql script from cykotitan:
Code:
CREATE TABLE IF NOT EXISTS `poll` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `question` VARCHAR(150) ,
  `created` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `date_start` datetime ,
  `date_end` datetime ,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `question` (`question`)
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
CREATE TABLE IF NOT EXISTS `poll_answer` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `poll_id` INT(11) NOT NULL,
  `answer` VARCHAR(150) ,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
 
CREATE TABLE IF NOT EXISTS `poll_votes` (
  `id` INT(11) NOT NULL AUTO_INCREMENT,
  `answer_id` INT(11) ,
  `poll_id` INT(11) ,
  `account_id` INT(11) NOT NULL,
  PRIMARY KEY (`id`),
  FOREIGN KEY (`answer_id`) REFERENCES `poll_answer` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`poll_id`) REFERENCES `poll` (`id`) ON DELETE CASCADE,
  FOREIGN KEY (`account_id`) REFERENCES `accounts` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB  DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

It created "poll" and "poll_answer" but did skip the poll_votes

Error messages:
Code:
ERRoR
SQL-question:

CREATE TABLE IF NOT EXISTS  `poll_votes` (

 `id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
 `answer_id` INT( 11 ) ,
 `poll_id` INT( 11 ) ,
 `account_id` INT( 11 ) NOT NULL ,
PRIMARY KEY (  `id` ) ,
FOREIGN KEY (  `answer_id` ) REFERENCES  `poll_answer` (  `id` ) ON DELETE CASCADE ,
FOREIGN KEY (  `poll_id` ) REFERENCES  `poll` (  `id` ) ON DELETE CASCADE ,
FOREIGN KEY (  `account_id` ) REFERENCES  `accounts` (  `id` ) ON DELETE CASCADE
) ENGINE = INNODB DEFAULT CHARSET = latin1 AUTO_INCREMENT =1;

MySQL sa: 

#1005 - Can't create table 'server.poll_votes' (errno: 150) (<a href="server_engines.php?engine=InnoDB&amp;page=Status&amp;token=9d2fe5949286562f3ca64d3097c72f02">Detaljer...</a>)

Any ideas?
 
Back
Top