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 ( ...@@ -6,8 +6,8 @@ CREATE TABLE tokens (
creation_date datetime DEFAULT NULL, creation_date datetime DEFAULT NULL,
expiration_date datetime DEFAULT NULL, expiration_date datetime DEFAULT NULL,
PRIMARY KEY (id), PRIMARY KEY (id),
KEY secret (secret), UNIQUE (secret),
KEY email_entity (email_address,entityid) UNIQUE (email_address(50),entityid(50))
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE entities ( CREATE TABLE entities (
...@@ -20,7 +20,7 @@ CREATE TABLE entities ( ...@@ -20,7 +20,7 @@ CREATE TABLE entities (
contacts varchar(2000) DEFAULT NULL, contacts varchar(2000) DEFAULT NULL,
federations varchar(50) DEFAULT NULL, federations varchar(50) DEFAULT NULL,
PRIMARY KEY (id), PRIMARY KEY (id),
KEY entityid (entityid) UNIQUE (entityid)
) ENGINE=MyISAM DEFAULT CHARSET=utf8; ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE accounts ( CREATE TABLE accounts (
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment