Skip to content

OpenSourceConsulting/playce-wasup-db-exporter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

##############################################################################

DB data to sql download

##############################################################################

Structure

{download Directory}
  ├── logs
  │    ├── {tablename}.log       // table log files
  ├── schema
  │    ├── schema-derby.sql      // table create schema
  │    ├── schema-maria.sql
  │    ├── schema-mysql.sql
  │    ├── schema-postgres.sql
  ├── (number)-{tablename}.sql   // table insert.sql files

Properties

# If you don't have a datasource URL, use the built-in datasource derby.
# https://docs.spring.io/spring-boot/docs/current/reference/html/howto-database-initialization.html
spring.datasource.platform=derby
spring.datasource.url=jdbc:derby://localhost:1527/wasupDB
#spring.datasource.url=jdbc:mysql://localhost:3306/wasup?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
#spring.datasource.url=jdbc:mysql://localhost:3306/wasupDB?useUnicode=true&characterEncoding=UTF-8&serverTimezone=UTC
# (Restore from a backup copy) https://db.apache.org/derby/docs/10.8/adminguide/cadminhubbkup98797.html
#spring.datasource.url=jdbc:derby://localhost:1527/wasupDB;restoreFrom=/opt/WASup/backup/wasup
spring.datasource.username=wasup
spring.datasource.password=wasup

# DDL mode. This is actually a shortcut for the "hibernate.hbm2ddl.auto" property.
# Defaults to "create-drop" when using an embedded database and no schema manager was detected.
# Otherwise, defaults to "none".
spring.jpa.hibernate.ddl-auto=none

# Hibernate additional native properties to set on the JPA provider.
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.DerbyTenSevenDialect
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL5InnoDBDialect
#spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect

wasup.db.download.path=

How to Run

java -Dwasup.db.download.path=$PATH_TO_DOWNLOAD -jar wasup-db-exporter-1.0.0.jar

How to Migrate

1. 각 데이터베이스에 맞는 schema/schema-{database}.sql 파일 실행해서 테이블 생성
2. Download 받은 {number}-{tablename}.sql 을 number의 순서에 따라 insert 실행

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages