Skip to content
Snippets Groups Projects
Commit ff2653e5 authored by Guillaume ROUSSE's avatar Guillaume ROUSSE
Browse files

fix maximum size limit for uniqueness constraints

Mariadb enforce a maximum size limits of 1000 bytes for indexes.
parent 2efee0a3
No related branches found
No related tags found
No related merge requests found
......@@ -6,8 +6,8 @@ CREATE TABLE tokens (
creation_date datetime DEFAULT NULL,
expiration_date datetime DEFAULT NULL,
PRIMARY KEY (id),
KEY secret (secret),
KEY email_entity (email_address,entityid)
UNIQUE (secret),
UNIQUE (email_address(50),entityid(50))
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE entities (
......@@ -20,7 +20,7 @@ CREATE TABLE entities (
contacts varchar(2000) DEFAULT NULL,
federations varchar(50) DEFAULT NULL,
PRIMARY KEY (id),
KEY entityid (entityid)
UNIQUE (entityid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE accounts (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment