Skip to content

Latest commit

 

History

History
38 lines (29 loc) · 1.08 KB

dbml.md

File metadata and controls

38 lines (29 loc) · 1.08 KB

DBML

한국어

Export

$ oct export dbml --help
Option Env. Variable Description
-i, --input OCTOPUS_INPUT Octopus schema file to read
-o, --output OCTOPUS_OUTPUT DBML file to write
-g, --groups OCTOPUS_GROUPS Table groups to export.
Set multiple groups with comma(,) separated.

Example

$ oct export dbml \
    --input examples/user.json \
    --output output/user.dbml

Exported dbml file:

Table group {
  id int64 [pk, not null, note: "unique id"]
  name varchar(40) [unique, not null, note: "group name"]
}

Table user {
  id int64 [pk, not null, note: "unique id"]
  name varchar(40) [unique, not null, note: "user login name"]
  group_id int64 [ref: > group.id, note: "group ID"]
}