mirror of
https://github.com/ent/ent.git
synced 2026-05-04 08:30:57 +03:00
dialect/sql/schema: change id type of ent_types table to be unsigned (#612)
This commit is contained in:
@@ -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")).
|
||||
|
||||
Reference in New Issue
Block a user