mirror of
https://github.com/go-shiori/shiori.git
synced 2025-03-10 23:05:33 +08:00
Add specific size to bookmark_url key
MySQL can't index an entire TEXT field; the key must be truncated https://stackoverflow.com/a/1827099
This commit is contained in:
parent
fbd4e37643
commit
76a7856f80
1 changed files with 1 additions and 1 deletions
|
@ -60,7 +60,7 @@ func OpenMySQLDatabase(connString string) (mysqlDB *MySQLDatabase, err error) {
|
|||
html MEDIUMTEXT NOT NULL DEFAULT "",
|
||||
modified TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY(id),
|
||||
UNIQUE KEY bookmark_url_UNIQUE (url),
|
||||
UNIQUE KEY bookmark_url_UNIQUE (url(255)),
|
||||
FULLTEXT (title, excerpt, content))`)
|
||||
|
||||
tx.MustExec(`CREATE TABLE IF NOT EXISTS tag(
|
||||
|
|
Loading…
Reference in a new issue