๐ Error-log
<Sequelize ์ค๋ฅ> Error: A column called 'id' was added to the attributes of 'Urls' but not marked with 'primaryKey: true'
Seungjae Lee
2021. 10. 18. 22:50
Sequelize๋ ํ ์ด๋ธ์ ์์ฑ ์, ์๋์ ์ผ๋ก id ์ปฌ๋ผ ์ถ๊ฐ์ PrimaryKey ์ค์ ์ ํด์ฃผ๋๋ฐ,
์ฌ์ฉ์๊ฐ ํ ์ด๋ธ์ ์์ฑํ ๋ ์์๋ก id ์ปฌ๋ผ์ ์ถ๊ฐํ์ ๊ฒฝ์ฐ ์์ ์๋ฌ๊ฐ ๋ฐ์ํ๋ค.
ํด๊ฒฐ๋ฐฉ๋ฒ์, ํ ์ด๋ธ์ ์์ฑํ ๋ id์ปฌ๋ผ์ ์ ์ธํ ๋๋จธ์ง ์ปฌ๋ผ๋ง ์ถ๊ฐํด์ฃผ๋ฉด ๋๋ค.
+ (createdAt, updatedAt ์ปฌ๋ผ๋ ์๋์ผ๋ก ์ถ๊ฐ๋๋ฏ๋ก ์ถ๊ฐํ ํ์ ์๋ค.)