From 89588959b1cbcc883007ee4c70f033ffc94087c8 Mon Sep 17 00:00:00 2001 From: khalilluo Date: Wed, 28 Sep 2022 19:32:02 +0800 Subject: [PATCH] supports the mediumint column when generate the mysql model (#1393) --- drogon_ctl/create_model.cc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drogon_ctl/create_model.cc b/drogon_ctl/create_model.cc index b929720f..5b62fc25 100644 --- a/drogon_ctl/create_model.cc +++ b/drogon_ctl/create_model.cc @@ -481,6 +481,11 @@ void create_model::createModelClassFromMysql( info.colType_ = "int16_t"; info.colLength_ = 2; } + else if (type.find("mediumint") == 0) + { + info.colType_ = "int32_t"; + info.colLength_ = 3; + } else if (type.find("int") == 0) { info.colType_ = "int32_t";