An open API service indexing awesome lists of open source software.

https://github.com/lechuckroh/octopus-db-tool

DB schema tools with format conversion, source generation, reverse/forward engineering
https://github.com/lechuckroh/octopus-db-tool

database-migration database-schema flyway gorm graphql jpa-hibernate liquibase mysql protobuf sqlalchemy

Last synced: 5 months ago
JSON representation

DB schema tools with format conversion, source generation, reverse/forward engineering

Awesome Lists containing this project

README

          

# octopus-db-tools

![Release](https://github.com/lechuckroh/octopus-db-tool/actions/workflows/release.yml/badge.svg)
![Test](https://github.com/lechuckroh/octopus-db-tool/actions/workflows/test.yml/badge.svg)

[한국어](README_kr.md)

octopus-db-tools provides:
* Import/Export various ERD definitions.
* Generate various file formats.

## Goals

* All-in-one tool to support every possible DB schema formats.
* DB schema is stored in text format for version control, diff and merge.
* Octopus-db-tool file format can be used as a SSOT(Single Source Of Truth).
* Single binary executable CLI which can be used as a part of CI(Continuous Integration), CD(Continuous Deployment) and IaC(Infrastructure as Code).

## Supported Formats

### Import
* Excel (`*.xlsx`)
* MySQL DDL (`*.sql`)
* octopus-db-tools v1 (`*.ojson`)
* StarUML

### Export
* DBML
* Excel (`*.xlsx`)
* MySQL DDL (`*.sql`)

### Generate
* GORM source files (`*.go`)
* GraphQL (`*.graphql`)
* JPA Kotlin (`*.kt`)
* Liquibase (`*.yaml`)
* PlantUML (`*.wsd`, `*.pu`, `*.puml`, `*.plantuml`, `*.iuml`)
* ProtoBuf (`*.proto`)
* [Quick DBD](https://www.quickdatabasediagrams.com/)
* SQLAlchemy (`*.py`)

## Install

```shell
$ brew tap lechuckroh/tap
$ brew install octopus-db-tool
```

To download binaries: see [Releases](https://github.com/lechuckroh/octopus-db-tool/releases) page.

## Build
### Local Build
Requirements:
* Golang 1.17 +
* make

Run:
```shell
$ make vendor
$ make compile

# build os-specific binary
$ make compile-windows-amd64
$ make compile-linux-amd64
$ make compile-linux-arm64
$ make compile-macos-amd64
$ make compile-macos-arm64
```

### Docker Build
```shell
$ make compile-docker; make compile-rmi
```

## Run

```shell
# show help
$ oct --help
```

See the following pages for command line options.

* [initialize](docs/init.md)
* Commands by format
* [DBML](docs/dbml.md)
* [Excel](docs/xlsx.md)
* [GORM](docs/gorm.md)
* [GraphQL](docs/graphql.md)
* [JPA](docs/jpa.md)
* [Liquibase](docs/liquibase.md)
* [MySQL](docs/mysql.md)
* [octopus-db-tools v1](docs/ojson.md)
* [ProtoBuf](docs/protobuf.md)
* [Quick DBD](docs/quickdbd.md)
* [SQLAlchemy](docs/sqlalchemy.md)
* [StarUML](docs/staruml.md)

## Documents

* [octopus file format](docs/octopus-format.md)