Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Users table creation fails with an error #15

Open
tomershay opened this issue Mar 15, 2018 · 2 comments
Open

Users table creation fails with an error #15

tomershay opened this issue Mar 15, 2018 · 2 comments

Comments

@tomershay
Copy link

tomershay commented Mar 15, 2018

When trying to import the latest Stackoverflow data files using SODDI v1.5, to MySQL 5.7, the Users table import fails with the error:
Unknown column AccountId in field list

@tomershay
Copy link
Author

It seems that mysql.sql doesn't define AccountId as part of the Users table. Modifying the table's structure to the following one resolved the problem.

CREATE  TABLE IF NOT EXISTS DUMMY.`users` (
  `Id` INT(11) NOT NULL /* IDENTITY */,
  `AboutMe` TEXT CHARACTER SET 'utf8' NULL DEFAULT NULL ,
  `Age` INT(11) NULL DEFAULT NULL ,
  `CreationDate` DATETIME NOT NULL ,
  `DisplayName` VARCHAR(40) CHARACTER SET 'utf8' NOT NULL ,
  `DownVotes` INT(11) NOT NULL ,
  `EmailHash` VARCHAR(40) CHARACTER SET 'utf8' NULL DEFAULT NULL ,
  `LastAccessDate` DATETIME NOT NULL ,
  `Location` VARCHAR(100) CHARACTER SET 'utf8' NULL DEFAULT NULL ,
  `Reputation` INT(11) NOT NULL ,
  `UpVotes` INT(11) NOT NULL ,
  `Views` INT(11) NOT NULL ,
  `WebsiteUrl` VARCHAR(200) CHARACTER SET 'utf8' NULL DEFAULT NULL,
  `AccountId` INT(11) NOT NULL,
   PRIMARY KEY (`Id`) 
  )
ENGINE = MyISAM
DEFAULT CHARACTER SET = latin1;

@BrentOzar
Copy link
Member

OK, cool. If you want to make a pull request, you're welcome to. (I don't use MySQL, so this wouldn't be something we'd fix - nothing against it, just don't have anything handy here to test.) If you don't want to change the code, no worries, just leave a note and we'll leave it as a known issue for MySQL users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants