const User = sequelize.define('User', {
Points: {
type: DataTypes.NUMBER,
defaultValue: 0,
allowNull: false
},
UserId: {
type: DataTypes.STRING,
allowNull: true
}
},
{
sequelize,
modelName: 'User',
tableName: 'Points'
});
User.sync()
This code chucks out a MariaDB error:
You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'NOT NULL DEFAULT 0, `UserId` VARCHAR(255) DEFAULT '', `createdAt` DATETIME NO...' at line 1
Could someone help please? I am quite new to this sort of thing so I wouldn't really know. Thanks!