Skip to content

Instantly share code, notes, and snippets.

@kuon
Created February 2, 2017 14:11
Show Gist options
  • Save kuon/ba334c7c0c10f0e303fd6a142e06fa30 to your computer and use it in GitHub Desktop.
Save kuon/ba334c7c0c10f0e303fd6a142e06fa30 to your computer and use it in GitHub Desktop.
Table "public.posts"
Column | Type | Modifiers
---------+---------+----------------------------------------------------
id | integer | not null default nextval('posts_id_seq'::regclass)
content | text |
Indexes:
"posts_pkey" PRIMARY KEY, btree (id)
Referenced by:
TABLE "comments" CONSTRAINT "comments_post_id_fkey"
FOREIGN KEY (post_id) REFERENCES posts(id) ON DELETE CASCADE
Table "public.comments"
Column | Type | Modifiers
---------+---------+-------------------------------------------------------
id | integer | not null default nextval('comments_id_seq'::regclass)
content | text |
post_id | integer |
Indexes:
"comments_pkey" PRIMARY KEY, btree (id)
Foreign-key constraints:
"comments_post_id_fkey" FOREIGN KEY (post_id)
REFERENCES posts(id) ON DELETE CASCADE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment