sqldoc

command module
v0.1.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2024 License: MIT Imports: 9 Imported by: 0

README

SQLDoc

SQLDoc is a markdown documentation for SQL tables. Inspired by Rails ActiveRecord schema.rb and drwl/annotaterb.

Demo of SQLDoc

Installation

Using Go

Recommended if you have Go toolchain already set up.

go install go.husin.dev/sqldoc@latest
Prebuilt binaries

Download the latest release from GitHub releases.

Features

  • Show columns
  • Show column types
  • Show column nullability and defaults
  • Show column indexes
  • Show column constraints

Supported database engines:

  • PostgreSQL
  • MySQL
  • SQLite

Why?

Projects often manages their schema roll out through migrations (e.g. golang-migrate/migrate). As a project matures, it's quite common to encounter several ALTER TABLE commands, which makes it difficult to have a near-instant idea of what the schema looks like.

In Rails, schema.rb provides that insight, while extensions like drwl/annotaterb goes further to co-locate the schema documentation with the model definitions.

SQLDoc makes it easy to look at Markdown documentation for SQL tables, which I prefer over running psql -c "\d+ table_name".

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL