Open adminy opened 1 year ago
Suppose instead of es5, es6, esm, ts types, it outputted this json structure:
[ { "tableName": "models" }, { "id": { "type": "DataTypes.INTEGER(11)", "allowNull": false, "primaryKey": true, "comment": "null", "autoIncrement": true }, "dbname": { "type": "DataTypes.STRING(45)", "allowNull": false, "autoIncrement": false, "comment": "null" }, "tablename": { "type": "DataTypes.STRING(45)", "allowNull": false, "autoIncrement": false, "comment": "null" }, "weekday": { "type": "DataTypes.ENUM(\"Sun\",\"Mon\",\"Tues\",\"Wed\",\"Thur\",\"Fri\",\"Sat\")", "allowNull": false, "autoIncrement": false, "comment": "null" }, "createdDate": { "type": "DataTypes.DATE", "allowNull": true, "defaultValue": "CURRENT_TIMESTAMP", "autoIncrement": false, "comment": "null" } } ]
Which makes it easy for you to simply Sequelize.import it.
It is a more convenient and useful from any js version to use the json format rather than version specific javascript code.
This is a good idea. I forked sequelize-auto I'd like to try this.
Suppose instead of es5, es6, esm, ts types, it outputted this json structure:
Which makes it easy for you to simply Sequelize.import it.
It is a more convenient and useful from any js version to use the json format rather than version specific javascript code.