반응형
동기화 시 MariaDB / Sequetize SQL 구문 오류 발생
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()
이 코드는 MariaDB 오류를 제거합니다.
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
누가 좀 도와주시겠어요?저는 이런 종류의 일은 처음이라 잘 알지 못합니다.감사합니다!
언급URL : https://stackoverflow.com/questions/70583429/mariadb-sequelize-sql-syntax-error-when-syncing
반응형
'programing' 카테고리의 다른 글
도커가 macOS에서 기본적으로 Linux/amd64 플랫폼을 사용하도록 강제 설정 (0) | 2023.08.11 |
---|---|
sufficialize.js 타임스탬프가 DATTIME이 아닙니다. (0) | 2023.08.11 |
고유한 url-frinly 경로를 생성하는 루프 (0) | 2023.08.11 |
파이썬에서 WSDL(SOAP) 웹 서비스를 사용하려면 어떻게 해야 합니까? (0) | 2023.08.11 |
(LocalDB)에 연결할 수 없음\MSSQLlocalDB -> '사용자-PC\'에 대한 로그인 실패사용자' (0) | 2023.08.11 |