We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Issues creating tables
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
Reason: MySQL has a prefix limitation of 767 bytes in InnoDB, and 1000 bytes in MYISAM.
Solution: add CHARACTER SET utf8 COLLATE utf8_general_ci after AUTO_INCREMENT=1 in CREATE TABLE report SQL query
report
Working query CREATE TABLE report(serialint(10) unsigned NOT NULL AUTO_INCREMENT,mindatetimestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),maxdatetimestamp NULL DEFAULT NULL,domainvarchar(255) NOT NULL,orgvarchar(255) NOT NULL,reportidvarchar(255) NOT NULL,emailvarchar(255) DEFAULT NULL,extra_contact_infovarchar(255) DEFAULT NULL,policy_adkimvarchar(20) DEFAULT NULL,policy_aspfvarchar(20) DEFAULT NULL,policy_pvarchar(20) DEFAULT NULL,policy_spvarchar(20) DEFAULT NULL,policy_pcttinyint(3) unsigned DEFAULT NULL,raw_xml mediumtext DEFAULT NULL, PRIMARY KEY (serial), UNIQUE KEY domain (domain,reportid), KEY maxdate (maxdate) ) AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_general_ci;
CREATE TABLE
(
int(10) unsigned NOT NULL AUTO_INCREMENT,
timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
timestamp NULL DEFAULT NULL,
varchar(255) NOT NULL,
varchar(255) DEFAULT NULL,
varchar(20) DEFAULT NULL,
tinyint(3) unsigned DEFAULT NULL,
mediumtext DEFAULT NULL, PRIMARY KEY (
), UNIQUE KEY
,
), KEY
) ) AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_general_ci;
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Issues creating tables
ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes
Reason: MySQL has a prefix limitation of 767 bytes in InnoDB, and 1000 bytes in MYISAM.
Solution: add
CHARACTER SET utf8 COLLATE utf8_general_ci
after
AUTO_INCREMENT=1
in CREATE TABLE
report
SQL queryWorking query
CREATE TABLE
report(
serialint(10) unsigned NOT NULL AUTO_INCREMENT,
mindatetimestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp(),
maxdatetimestamp NULL DEFAULT NULL,
domainvarchar(255) NOT NULL,
orgvarchar(255) NOT NULL,
reportidvarchar(255) NOT NULL,
emailvarchar(255) DEFAULT NULL,
extra_contact_infovarchar(255) DEFAULT NULL,
policy_adkimvarchar(20) DEFAULT NULL,
policy_aspfvarchar(20) DEFAULT NULL,
policy_pvarchar(20) DEFAULT NULL,
policy_spvarchar(20) DEFAULT NULL,
policy_pcttinyint(3) unsigned DEFAULT NULL,
raw_xmlmediumtext DEFAULT NULL, PRIMARY KEY (
serial), UNIQUE KEY
domain(
domain,
reportid), KEY
maxdate(
maxdate) ) AUTO_INCREMENT=1 CHARACTER SET utf8 COLLATE utf8_general_ci;
The text was updated successfully, but these errors were encountered: