sequelize-auto icon indicating copy to clipboard operation
sequelize-auto copied to clipboard

Problems with types for MariaDB

Open boxsnake opened this issue 5 years ago • 1 comments

I am using mariadb 10.2, and maybe some are mariadb's problem, not sequelize-auto's. However, I hope you can consider these situations and do some fix, thanks.

  • Type TEXT has a default value of '\'\'', expect '' (i.e. empty string)
    • This is maybe maria's problem, in MySQL, Text does not have defaultValue in table schema, while in mariadb, it has '' showing in Navicat.
    • It will be more covenient to make TEXT's defaultValue ''
  • Type BIGTEXT has no default value.
    • This is maria's problem (so as mysql), but it will be more benefit to make an empty string.
  • Type of numbers (FLOAT, INT, etc.) has a defaultValue of string in generated js

boxsnake avatar Jul 24 '19 09:07 boxsnake

I think these problems are fixed in recent versions. Can you please try it?

steveschmitt avatar Nov 19 '20 21:11 steveschmitt