{"id":1510,"date":"2018-02-25T20:49:46","date_gmt":"2018-02-25T11:49:46","guid":{"rendered":"http:\/\/www.cotegg.com\/blog\/?p=1510"},"modified":"2018-02-25T20:52:36","modified_gmt":"2018-02-25T11:52:36","slug":"er%e5%9b%b3%e3%82%92%e8%87%aa%e5%8b%95%e7%94%9f%e6%88%90%e3%81%97%e3%81%9f%e3%81%84%e3%81%8b%e3%82%89%e3%82%84%e3%81%a3%e3%81%a6%e3%81%bf%e3%81%9f%e3%80%82","status":"publish","type":"post","link":"https:\/\/www.cotegg.com\/blog\/?p=1510","title":{"rendered":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002"},"content":{"rendered":"<p>ER\u56f3\u3063\u3066\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3051\u3069\u3001\u4f5c\u308b\u306e\u9762\u5012\u3067\u3059\u3088\u306d\u3002<br \/>\n\u3061\u3087\u3063\u3068\u6642\u9593\u3092\u7f6e\u3044\u305f\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3060\u3068\u300c\u3053\u308c\u3063\u3066\u672c\u5f53\u306b\u6700\u65b0\u7248\u3060\u3063\u3051\uff1f\u300d\u3068\u306a\u308b\u3053\u3068\u3082\u3002<br \/>\n\u305d\u3053\u3067ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3092\u8a66\u3057\u3066\u307f\u307e\u3057\u305f\u3002<\/p>\n<h3>\u524d\u63d0<\/h3>\n<ul>\n<li>homebrew\u304c\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3055\u308c\u3066\u3044\u308b\u3002<\/li>\n<li>rails\u30d7\u30ed\u30b8\u30a7\u30af\u30c8\u3067\u8a66\u3059\u3002<\/li>\n<\/ul>\n<h3>homebrew\u3067graphviz\u306e\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb<\/h3>\n<p>\u307e\u305a\u306f\u3001graphviz\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u307e\u3059\u3002<br \/>\ngraphviz\u306fDOT\u8a00\u8a9e\u3068\u3044\u3046\u8a00\u8a9e\u3067\u30b0\u30e9\u30d5\u69cb\u9020\u3092\u8a18\u8ff0\u3067\u304d\u308b\u30d1\u30c3\u30b1\u30fc\u30b8\u3060\u305d\u3046\u3067\u3059\u3002<br \/>\nhttps:\/\/ja.wikipedia.org\/wiki\/Graphviz<\/p>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\n$ brew install graphviz\n<\/pre>\n<p>homebrew\u4e45\u3057\u3076\u308a\u306b\u4f7f\u3063\u305f\u3089\u3001\u3046\u307e\u304f\u3044\u304d\u307e\u305b\u3093\u3067\u3057\u305f\u3002<br \/>\nbrew doctor \u3067\u78ba\u8a8d\u3057\u305f\u3089\u3001warning  ~ cellar\u3067\u5f15\u3063\u304b\u304b\u3063\u3066\u3044\u305f\u306e\u3067\u3001<br \/>\nbrew unlink\u3067\u7121\u4e8b\u89e3\u6d88\u3067\u304d\u307e\u3057\u305f\u3002<\/p>\n<h3>gemfile\u306b\u8ffd\u52a0<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ngroup :local do\n gem &amp;#039;rails-erd&amp;#039;\nend\n<\/pre>\n<p>github\u30ea\u30f3\u30af<br \/>\nhttps:\/\/github.com\/voormedia\/rails-erd<\/p>\n<h3>\u30b3\u30de\u30f3\u30c9\u5165\u529b<\/h3>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\nbundle exec erd --inheritance --direct --attributes=foreign_keys,content --filetype=dot\n<\/pre>\n<p>erd.dot\u30d5\u30a1\u30a4\u30eb\u304c\u751f\u6210\u3055\u308c\u308b\u3002<\/p>\n<h3>dot\u30d5\u30a1\u30a4\u30eb\u3092\u95b2\u89a7\u3067\u304d\u308b\u5f62\u5f0f\u306b\u5909\u66f4<\/h3>\n<p>erd.dot\u306e\u3042\u308b\u30c7\u30a3\u30ec\u30af\u30c8\u30ea\u3067\u4ee5\u4e0b\u306e\u30b3\u30de\u30f3\u30c9\u3092\u5165\u529b<\/p>\n<ul>\n<li>pdf\u51fa\u529b\u306e\u5834\u5408<\/li>\n<\/ul>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndot -Tpdf erd.dot &amp;gt; erd.pdf\n<\/pre>\n<ul>\n<li>png\u51fa\u529b\u306e\u5834\u5408<\/li>\n<\/ul>\n<pre class=\"brush: plain; title: ; notranslate\" title=\"\">\ndot -Tpng erd.dot &amp;gt; erd.png\n<\/pre>\n<p>\u601d\u3063\u305f\u3088\u308a\u3044\u3044\u611f\u3058\u306b\u51fa\u307e\u3057\u305f\u3002\u5b09\u3057\u3044\u3067\u3059\u3002<\/p>\n<p>\u305d\u306e\u3046\u3061\u3001\u3067\u304d\u305f\u3089docker\u3092\u7acb\u3061\u4e0a\u3052\u305f\u3068\u304d\u306b\u81ea\u52d5\u3067\u4f5c\u308c\u308b\u3088\u3046\u306b\u3057\u305f\u3044\u3067\u3059\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>ER\u56f3\u3063\u3066\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3051\u3069\u3001\u4f5c\u308b\u306e\u9762\u5012\u3067\u3059\u3088\u306d\u3002 \u3061\u3087\u3063\u3068\u6642\u9593\u3092\u7f6e\u3044\u305f\u30d7\u30ed\u30b8 &#8230; <\/p>\n","protected":false},"author":10,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.13 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cotegg.com\/blog\/?p=1510\" \/>\n<meta property=\"og:locale\" content=\"ja_JP\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"og:description\" content=\"ER\u56f3\u3063\u3066\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3051\u3069\u3001\u4f5c\u308b\u306e\u9762\u5012\u3067\u3059\u3088\u306d\u3002 \u3061\u3087\u3063\u3068\u6642\u9593\u3092\u7f6e\u3044\u305f\u30d7\u30ed\u30b8 ...\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cotegg.com\/blog\/?p=1510\" \/>\n<meta property=\"og:site_name\" content=\"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/COTegg.japan\/\" \/>\n<meta property=\"article:published_time\" content=\"2018-02-25T11:49:46+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-02-25T11:52:36+00:00\" \/>\n<meta name=\"author\" content=\"koyamak\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:site\" content=\"@cotegg_japan\" \/>\n<meta name=\"twitter:label1\" content=\"\u57f7\u7b46\u8005\" \/>\n\t<meta name=\"twitter:data1\" content=\"koyamak\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510\"},\"author\":{\"name\":\"koyamak\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/db878500c9ef5cbdeca0ba2a1c56cac1\"},\"headline\":\"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002\",\"datePublished\":\"2018-02-25T11:49:46+00:00\",\"dateModified\":\"2018-02-25T11:52:36+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510\"},\"wordCount\":92,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=1510#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510\",\"url\":\"https:\/\/www.cotegg.com\/blog\/?p=1510\",\"name\":\"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4\",\"isPartOf\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\"},\"datePublished\":\"2018-02-25T11:49:46+00:00\",\"dateModified\":\"2018-02-25T11:52:36+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510#breadcrumb\"},\"inLanguage\":\"ja\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cotegg.com\/blog\/?p=1510\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/?p=1510#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.cotegg.com\/blog\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#website\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"name\":\"COTegg\u306e\u30d0\u30b1\u30c4\",\"description\":\"- Bucket of cotegg -\",\"publisher\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"ja\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#organization\",\"name\":\"COTegg Inc.\",\"url\":\"https:\/\/www.cotegg.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"contentUrl\":\"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png\",\"width\":176,\"height\":60,\"caption\":\"COTegg Inc.\"},\"image\":{\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/COTegg.japan\/\",\"https:\/\/twitter.com\/cotegg_japan\",\"https:\/\/www.instagram.com\/cotegg_japan\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/db878500c9ef5cbdeca0ba2a1c56cac1\",\"name\":\"koyamak\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"ja\",\"@id\":\"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/54c82918922033a6338233d1ad970bef?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/54c82918922033a6338233d1ad970bef?s=96&d=mm&r=g\",\"caption\":\"koyamak\"},\"url\":\"https:\/\/www.cotegg.com\/blog\/?author=10\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.cotegg.com\/blog\/?p=1510","og_locale":"ja_JP","og_type":"article","og_title":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","og_description":"ER\u56f3\u3063\u3066\u5206\u304b\u308a\u3084\u3059\u3044\u3067\u3059\u3051\u3069\u3001\u4f5c\u308b\u306e\u9762\u5012\u3067\u3059\u3088\u306d\u3002 \u3061\u3087\u3063\u3068\u6642\u9593\u3092\u7f6e\u3044\u305f\u30d7\u30ed\u30b8 ...","og_url":"https:\/\/www.cotegg.com\/blog\/?p=1510","og_site_name":"\u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","article_publisher":"https:\/\/www.facebook.com\/COTegg.japan\/","article_published_time":"2018-02-25T11:49:46+00:00","article_modified_time":"2018-02-25T11:52:36+00:00","author":"koyamak","twitter_card":"summary_large_image","twitter_creator":"@cotegg_japan","twitter_site":"@cotegg_japan","twitter_misc":{"\u57f7\u7b46\u8005":"koyamak"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.cotegg.com\/blog\/?p=1510#article","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=1510"},"author":{"name":"koyamak","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/db878500c9ef5cbdeca0ba2a1c56cac1"},"headline":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002","datePublished":"2018-02-25T11:49:46+00:00","dateModified":"2018-02-25T11:52:36+00:00","mainEntityOfPage":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=1510"},"wordCount":92,"commentCount":0,"publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"inLanguage":"ja","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.cotegg.com\/blog\/?p=1510#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.cotegg.com\/blog\/?p=1510","url":"https:\/\/www.cotegg.com\/blog\/?p=1510","name":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002 | \u30b3\u30fc\u30c6\u30c3\u30b0\u306e\u30d0\u30b1\u30c4","isPartOf":{"@id":"https:\/\/www.cotegg.com\/blog\/#website"},"datePublished":"2018-02-25T11:49:46+00:00","dateModified":"2018-02-25T11:52:36+00:00","breadcrumb":{"@id":"https:\/\/www.cotegg.com\/blog\/?p=1510#breadcrumb"},"inLanguage":"ja","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.cotegg.com\/blog\/?p=1510"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.cotegg.com\/blog\/?p=1510#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.cotegg.com\/blog"},{"@type":"ListItem","position":2,"name":"ER\u56f3\u3092\u81ea\u52d5\u751f\u6210\u3057\u305f\u3044\u304b\u3089\u3084\u3063\u3066\u307f\u305f\u3002"}]},{"@type":"WebSite","@id":"https:\/\/www.cotegg.com\/blog\/#website","url":"https:\/\/www.cotegg.com\/blog\/","name":"COTegg\u306e\u30d0\u30b1\u30c4","description":"- Bucket of cotegg -","publisher":{"@id":"https:\/\/www.cotegg.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.cotegg.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"ja"},{"@type":"Organization","@id":"https:\/\/www.cotegg.com\/blog\/#organization","name":"COTegg Inc.","url":"https:\/\/www.cotegg.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","contentUrl":"https:\/\/www.cotegg.com\/blog\/wp-content\/uploads\/2015\/07\/logo_color1_yoko-e1436354651882.png","width":176,"height":60,"caption":"COTegg Inc."},"image":{"@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/COTegg.japan\/","https:\/\/twitter.com\/cotegg_japan","https:\/\/www.instagram.com\/cotegg_japan\/"]},{"@type":"Person","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/db878500c9ef5cbdeca0ba2a1c56cac1","name":"koyamak","image":{"@type":"ImageObject","inLanguage":"ja","@id":"https:\/\/www.cotegg.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/54c82918922033a6338233d1ad970bef?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/54c82918922033a6338233d1ad970bef?s=96&d=mm&r=g","caption":"koyamak"},"url":"https:\/\/www.cotegg.com\/blog\/?author=10"}]}},"_links":{"self":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1510"}],"collection":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/10"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1510"}],"version-history":[{"count":4,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1510\/revisions"}],"predecessor-version":[{"id":1515,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/1510\/revisions\/1515"}],"wp:attachment":[{"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1510"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1510"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cotegg.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1510"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}