분류 전체보기366 [Node.js] sequelize.import is not a function error 에러 해결 이부분을 .forEach((file) => { const model = sequelize.import(path.join(__dirname), file) // error occurs here db[model.name] = model }) 이렇게 변경해주면 잘된다. .forEach((file) => { const model = require(path.join(__dirname, file))( sequelize, Sequelize.DataTypes ) db[model.name] = model }) 2021. 9. 8. [Node.js] Browserslist: caniuse-lite is outdated. Please run 오류 오류 해결방법 npm update caniuse-lite browserslist npm i npm-update-all -g npm-update-all npx browserslist@latest update-db 입력하라고 해결방안 제시 2021. 9. 8. 저장소 변경 git bash https://webisfree.com/2020-04-14/[git]-git-remote-repository-%EB%B3%80%EA%B2%BD%ED%95%98%EB%8A%94-%EB%B0%A9%EB%B2%95 [Git] git remote repository 변경하는 방법 Git에서 리모트 저장소(remote repository)를 다른 주소 URL로 변경하고자 합니다. 예를들어 두 개의 git 리모트 저장소 있는 경우 한 쪽에서 다른 쪽으로 바꾸는 경우가 있겠죠. webisfree.com Git에서 리모트 저장소(remote repository)를 다른 주소 URL로 변경하고자 합니다. 예를들어 두 개의 git 리모트 저장소 있는 경우 한 쪽에서 다른 쪽으로 바꾸는 경우가 있겠죠. ! 언제 리모트 저장.. 2021. 9. 6. pgadmin import table https://ysyblog.tistory.com/143 2021. 9. 6. 쿼리 예약어 https://server-dev.tistory.com/189 2021. 9. 3. [postgre] foreign key가 존재하는 table을 truncate/delete할때 constraint 에러 문제 해결하기 https://devpouch.tistory.com/111 2021. 9. 3. postgresql- truncate 테이블 데이터 모두 삭제 truncate 명령어는 테이블의 모든 데이터를 삭제하는 명령어이다. delete 명령어와 차이점은 delete의 경우는 행이 삭제 될 때마다 많은 자원이 소모되고 트리거가 걸려있다면 행이 삭제될 때마다 실행된다. 이전에 할당되었던 영역은 삭제되어 빈 테이블이나 클러스터에 그대로 남아있게된다. 쉽게 말하면 데이터 잔여물이 남게된다. 반면 truncate는 비교적 빠르게 데이터 삭제가 가능하며 해당 삭제에 대해서 어떤 롤백 정보도 만들지 않고 바로 커밋한다. 즉 , 롤백이 불가능하다는 뜻이다. 또한 truncate는 트리거나 무결성 제약에 영향을 주지 않는다. delete와는 다르게 행을 삭제 할 때마다 트리거가 실행되지 않는다. 사용법은 아래와 같다. truncate table test_t.. 2021. 9. 2. 삽질 1 시퀄라이즈 model, DB 칼럼 타입 불일치 2021. 8. 30. Postgre// 칼럼 추가 컬럼추가 ALTER TABLE books ADD publication date; 컬럼삭제 ALTER TABLE books DROP publication; 컬럼 default값 추가 ALTER TABLE books ALTER COLUMN id SET DEFAULT nextval('books_idx'); 컬럼 default값 제거 ALTER TABLE books ALTER id DROP DEFAULT; 컬럼 NOT NULL 세팅 ALTER TABLE books ALTER COLUMN id SET NOT NULL; 컬럼 NOT NULL 제거 ALTER TABLE books ALTER COLUMN id DROP NOT NULL; 테이블 이름 변경 ALTER TABLE books RENAME TO literatu.. 2021. 8. 25. 이전 1 ··· 5 6 7 8 9 10 11 ··· 41 다음