I am currently faced with a dilemma where I need to integrate sequelize
with an existing MySQL
database. To simplify the process, I decided it would be best to use a code generator to create the necessary Model
s for sequelize
.
After some research, I stumbled upon sequelize-auto
and managed to successfully generate the required Model
s within my codebase.
Upon reviewing the documentation, I discovered that the generator command offers various optional flags. One of these options is -z
or --typescript
, which is supposed to produce the Model
s as typescript
files. However, despite using this flag, the generated code still appears in js
format with .js
file extensions.
Despite searching for solutions from others who may have encountered similar challenges, I came up empty-handed.
Does anyone have any insights into what steps I might be overlooking?
The command I executed is as follows:
sequelize-auto -h myDb -d database_name -u some_user -x some_password -p 3306 -e mysql -o src/models -C --typescript
Thank you for your help!