0.0.7 • Published 2 years ago

dbschema-markdown v0.0.7

Weekly downloads
6
License
MIT
Repository
github
Last release
2 years ago

dbschema-markdown

The easiest way to document your Database schema.


This package will generate Markdown that beautifully renders your Database schema in an easily explorable document.

$ npm install dbschema-markdown -g

Usage

Command Line API

Installing the package adds a dbschema-markdown script. Point it at a schema and the output will be written to stdout.

The schema may be retrieved from a Database endpoint:

$ dbschema-markdown "Data Source=SERVER\INSTANCE;Initial Catalog=Demo;Persist Security Info=True;User ID=APP_Demo;password=XXXXX" > schema.md

…or update existing file:

$ dbschema-markdown "Data Source=SERVER\INSTANCE;Initial Catalog=Demo;Persist Security Info=True;User ID=APP_Demo;password=XXXXX" -u "./schema.md"

If --update-file is given, the generated Markdown will be output to the given file between the <!-- START dbschema-markdown --> and <!-- END dbschema-markdown --> comment markers instead of printed to STDOUT. If the file does not exist, it will be created (and will include the comment markers for future updates).

Options

$ dbschema-markdown --help

Usage: dbschema-markdown [options] <connectionString>

Output a Markdown document 

Options:

  --update-file <file>   Markdown document to update (between comment markers) or
                         create (if the file does not exist)

Output

Database Demo

dbo.Logs

NameColumnTypeNullableDefaultExampleComments
LogsIDint()falsePRIMARY KEY
LogsCreateddatetime()true(getdate())

dbo.Users

This is a demo, Additional Information about the Table

NameColumnTypeNullableDefaultExampleComments
UsersIDint()falsePrimary KeyPRIMARY KEY
UsersNamevarchar(50)falseFull Name
0.0.7

2 years ago

0.0.6

3 years ago

0.0.5

4 years ago

0.0.3

4 years ago

0.0.4

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago