dialect/sql/schema: change id type of ent_types table to be unsigned (#612)

This commit is contained in:
Ariel Mashraki
2020-07-16 20:07:37 +03:00
committed by GitHub
parent 4e9fd67a3e
commit 33e4eb3a52
2 changed files with 2 additions and 2 deletions

View File

@@ -853,7 +853,7 @@ func TestMySQL_Create(t *testing.T) {
mock.start("5.7.23")
mock.tableExists("ent_types", false)
// create ent_types table.
mock.ExpectExec(escape("CREATE TABLE IF NOT EXISTS `ent_types`(`id` bigint AUTO_INCREMENT NOT NULL, `type` varchar(255) UNIQUE NOT NULL, PRIMARY KEY(`id`)) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")).
mock.ExpectExec(escape("CREATE TABLE IF NOT EXISTS `ent_types`(`id` bigint unsigned AUTO_INCREMENT NOT NULL, `type` varchar(255) UNIQUE NOT NULL, PRIMARY KEY(`id`)) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")).
WillReturnResult(sqlmock.NewResult(0, 1))
mock.tableExists("users", false)
mock.ExpectExec(escape("CREATE TABLE IF NOT EXISTS `users`(`id` bigint AUTO_INCREMENT NOT NULL, PRIMARY KEY(`id`)) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin")).