From 7f70e4f72d4756033fef34a90b5dabe0cd93e785 Mon Sep 17 00:00:00 2001 From: foresmac Date: Wed, 6 Jan 2016 16:07:27 -0600 Subject: [PATCH] Add sample output Fixes #8 --- README.md | 17 ++++++++++++++++- SAMPLE_TABLES.md | 40 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 SAMPLE_TABLES.md diff --git a/README.md b/README.md index fd8331d..252f3b5 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -A command line tool that generates markdown documentation for Postgres tables in a given schema +A command line tool that generates Markdown documentation for Postgres tables in a given schema. ## Installation ``` @@ -28,6 +28,21 @@ postgres://username:password@host:port/dbname ``` +## Sample Output + +The generated Markdown details the column name, type, and default value for each table defined in your schema. It also displays nicely in GitHub (see more [here](./SAMPLE_TABLES.md)). + +### app_users + +Column | Type | Default | Nullable +--- | --- | --- | --- +id | integer | nextval('app_users_id_seq'::regclass) | NO +email | character varying | None | NO +password | character varying | None | YES +is_active | boolean | true | YES +is_admin | boolean | false | YES + + ## Run tests with Docker Compose ``` docker-compose run cli nosetests -v diff --git a/SAMPLE_TABLES.md b/SAMPLE_TABLES.md new file mode 100644 index 0000000..302117e --- /dev/null +++ b/SAMPLE_TABLES.md @@ -0,0 +1,40 @@ +### app_email_change_request + +Column | Type | Default | Nullable +--- | --- | --- | --- +id | integer | nextval('app_email_change_request_id_seq'::regclass) | NO +user_id | integer | None | YES +new_email | character varying | None | NO +code | character varying | None | NO +expires | timestamp without time zone | (timezone('utc'::text, now()) + '1 day'::interval) | YES + +### app_password_reset + +Column | Type | Default | Nullable +--- | --- | --- | --- +id | integer | nextval('app_password_reset_id_seq'::regclass) | NO +user_id | integer | None | YES +code | character varying | None | NO +expires | timestamp without time zone | (timezone('utc'::text, now()) + '1 day'::interval) | YES +code_used | boolean | false | YES + +### app_push_tokens + +Column | Type | Default | Nullable +--- | --- | --- | --- +id | integer | nextval('app_push_tokens_id_seq'::regclass) | NO +user_id | integer | None | YES +token | character varying | None | NO +type | character varying | None | NO +sns_arn | character varying | None | NO +created | timestamp without time zone | timezone('utc'::text, now()) | YES + +### app_users + +Column | Type | Default | Nullable +--- | --- | --- | --- +id | integer | nextval('app_users_id_seq'::regclass) | NO +email | character varying | None | NO +password | character varying | None | YES +is_active | boolean | true | YES +is_admin | boolean | false | YES