Skip to content

Commit

Permalink
Reduce the column size for utf8mb4
Browse files Browse the repository at this point in the history
  • Loading branch information
josephspurrier committed Jan 13, 2019
1 parent 33af575 commit 914820e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go

services:
- mysql:5.7
- mysql

go:
- "1.8"
Expand Down
10 changes: 5 additions & 5 deletions pkg/adapter/mysql/mysql.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ import (
const (
tableName = "rovechangelog"
createQuery = `CREATE TABLE IF NOT EXISTS ` + tableName + ` (
id varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
author varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
filename varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
id varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
author varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
filename varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
dateexecuted datetime NOT NULL,
orderexecuted int(11) NOT NULL,
checksum varchar(35) COLLATE utf8mb4_unicode_ci NOT NULL,
description varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL,
tag varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL UNIQUE,
description varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
tag varchar(191) COLLATE utf8mb4_unicode_ci DEFAULT NULL UNIQUE,
version varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci`
)
Expand Down

0 comments on commit 914820e

Please sign in to comment.