462 #162
462
#162
Replies: 1 comment 2 replies
-
pg_dump -U sa -h localhost postgres > backup.sql by default gives you the COPY command to insert data. if the db data is large or if you're using a platform that does not support the COPY command yet. adding --insert can help. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
462
Intro liquibase를 사용하여 데이터베이스 스키마를 관리하고 있습니다. 주로 PostgreSQL을 사용하고 있는데, 테스트를 수행할 때 별도의 외부 DB를 사용하지 않고 인메모리 DB를 이용하고자 했습니다. 그런데 gen_random_uuid와 같은 일부 PostgreSQL 문법과 시퀀스 생성 등이 발목을 잡았습니다. 그래서 인메모리 DB로 테스트를 할 때는 liquibase를 사용하지 않고, data.sql 파일을 불러와서 DB스키마를 생성하려고 합니다. 이를 위해 먼저 liquibase를 사용하여 PostgreSQL 데이터베이스에 초기 데이터를 입력한 다음, 이를 SQL로 추출하여 H2에서 사용 가능하게 편집하려고 합니다. liquibase로 변경 로그를 불러와 SQL로 추출할 수도 있지만,..
https://shanepark.tistory.com/462
Beta Was this translation helpful? Give feedback.
All reactions