Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
rails-erdと初めてのOSSコントリビューション
Search
kikunantoka
July 18, 2017
Technology
0
870
rails-erdと初めてのOSSコントリビューション
@第6回スタートアップRails勉強会 (
https://connpass.com/event/59930/
)
kikunantoka
July 18, 2017
Tweet
Share
More Decks by kikunantoka
See All by kikunantoka
個人開発しているサービスのインフラをAWSからGCPに載せ替えた話 💪 / kojin_kaihatsu_night_3
kikunantoka
0
950
Gatsby.jsとCloud Functionsで毎週自動でコンテンツが更新され続けるフレームワーク比較サイトを作った話 / gotanda_js_13
kikunantoka
1
2.3k
Gatsby.jsとCloud Functionsで毎週自動でコンテンツが更新され続けるフレームワーク比較サイトを作った話 / frontend_night_1
kikunantoka
3
1.5k
サービスがゼロからN億円規模になるまに実践した7つのやっていき / 7_yatteiki_battle_conference_u30_2019
kikunantoka
1
1.3k
Gatsby.jsとNetlifyとの付き合い方 / gatsby-js-and-netlify
kikunantoka
3
530
Gatsby.jsで導入事例をバシバシ読めるSPAなLPを作った話 / gatsby-js-for-biz-lp
kikunantoka
2
550
Gatsby.jsで導入事例をバシバシ読めるSPAなLPを作った話 / gatsby-js-for-biz-lp
kikunantoka
1
1.8k
今日から始める Flood.io / fuka-taisaku-night-01
kikunantoka
0
270
20万RPMを捌くRailsアプリケーションの作り方
kikunantoka
0
730
Other Decks in Technology
See All in Technology
AWS Lambdaと歩んだ“サーバーレス”と今後 #lambda_10years
yoshidashingo
1
180
ISUCONに強くなるかもしれない日々の過ごしかた/Findy ISUCON 2024-11-14
fujiwara3
8
870
Taming you application's environments
salaboy
0
190
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
0
130
AWS Media Services 最新サービスアップデート 2024
eijikominami
0
200
AI前提のサービス運用ってなんだろう?
ryuichi1208
8
1.4k
いざ、BSC討伐の旅
nikinusu
2
780
アジャイルでの品質の進化 Agile in Motion vol.1/20241118 Hiroyuki Sato
shift_evolve
0
170
Platform Engineering for Software Developers and Architects
syntasso
1
520
複雑なState管理からの脱却
sansantech
PRO
1
150
【Pycon mini 東海 2024】Google Colaboratoryで試すVLM
kazuhitotakahashi
2
540
Lambdaと地方とコミュニティ
miu_crescent
2
370
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
28
9.1k
Ruby is Unlike a Banana
tanoku
97
11k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
A better future with KSS
kneath
238
17k
Teambox: Starting and Learning
jrom
133
8.8k
StorybookのUI Testing Handbookを読んだ
zakiyama
27
5.3k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
720
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Being A Developer After 40
akosma
87
590k
Building Applications with DynamoDB
mza
90
6.1k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
rails-erdͱ ॳΊͯͷOSSίϯτϦϏϡʔγϣϯ @kikunantoka
ࣗݾհ about: name: Fumitaka Kikukawa twitter: @kikunantoka work_at: giftee Inc.
// giftee is a good company.
ΞδΣϯμ • DBઃܭͷΓํʹ͍ͭͯʢπʔϧʣ • rails-erdʹ͍ͭͯ • ॳΊͯOSSίϯτϦϏϡʔτͨ͠
Έͳ͞Μ DBઃܭ͢Δ࣌ͬͯɺ ͲΜͳπʔϧͬͯ·͔͢ʁ
gifteeͰ 1. MySQLWorkbenchͰୟ͖Λ࡞Δ 2. ΈΜͳͰٞ͠ͳ͕Βमਖ਼ 3. $ rails g model
4. ͦͷޙrails-erdͰࣗಈग़ྗ
ྫ͑ • ΧδϡΞϧΪϑτΛૹΔαʔϏεΛߟ͑Δ
MySQLWorkbench • ୟ͖Λ࡞Δ
ΈΜͳͰٞ • “serial”࿈൪ͳҙຯ߹͍͋Δ͔ΒɺϥϯμϜ ͳจࣈྻѻ͏ΧϥϜͳΒ “code”͡Όͳ͍ʁ
Railsʹࣗಈग़ྗ…Ͱ͖ͳ͍ʁ • mysql workbench rails exporter plugin • αϙʔτ͕ଓ͍͍ͯͳ͍
Railsʹࣗಈग़ྗ…Ͱ͖ͳ͍ʁ • MySQLWorkbenchͰSQLΛΤΫεϙʔτ͠ ͯɺSQLΛ࣮ߦ • $ rails db:schema:dump • ΞιγΤʔγϣϯखಈ
$ rails g model
࣮͕ਐΉʹͭΕ… • ͋ͬɺͬͺΓ͜ͷΧϥϜඞཁͳ͔ͬͨ • ͜ͷςʔϒϧɺͬͺΓ͚ͨ͘ͳ͍ʁ → ίʔυͷमਖ਼ΛMySQLWorkbenchʹө͠ଓ͚Δ ͷ͕ਏ͍… → ޙͰೖͬͨਓ͕ςʔϒϧߏΛΩϟονΞοϓͰ͖
ͳ͍
rails-erd
rails-erd • DB schemaͱΞιγΤʔγϣϯ͔ΒࣗಈͰER ਤΛੜͯ͘͠ΕΔgem • https://github.com/voormedia/rails-erd
rails-erd • ʮύʔϑΣΫτRuby on RailsʯͰհ͞Ε͍ͯΔ • 5-6ষ rails-erdͰϞσϧ ͷERਤΛੜ͢Δ
rails-erd • $ bundle exec erd
rails-erd • erd.pdf
͜Μͳͷग़ྗͰ͖·͢
͜Μͳͷग़ྗͰ͖·͢
͓͢͢Ίͷerdconfig
ࣗಈԽ • มߋͷʹίϚϯυଧͭͷΊΜͲ͍͘͞ • http://qiita.com/kikunantoka/items/1eb0f1bb0213450611c6
ࣗಈԽ
͞ΒͳΔࣗಈԽ • ϓϩδΣΫτຖʹίϐϖ͢ΔͷΊΜͲ͏ • ීٴ͠ͳͦ͞͏
δΣωϨʔλͩ • ຊՈΛݟͯΈΔ • ࠟ͋ΔͷͷɺͲ͏Βಈ͍͍ͯͳ͍Α ͏ͩ…
ॳΊͯͷ OSSίϯτϦϏϡʔτ
Issueཱ͕͍ͬͯͨ • ͜ΕͳΒͤͦ͏
PRΛ͛Δ·Ͱ 1. ϓϩδΣΫτΛFork 2. ࣮ 3. commit 4. kikunantoka/rails-erdʹPush 5.
PRΛ͛Δ
PR
2ि͙ؒΒ͍ ແԠͩͬͨͷͷ… ͠ΕͬͱϚʔδ͞Εͯͨʂ
Published
Contributors
Կ͕มΘ͔ͬͨ • $ rails g erd:install • ࣗಈͰϑΝΠϧ͕࡞͞Εɺdb:migrateΛ hookͯ͠ɺERਤΛੜͯ͘͠ΕΔ
OSSͷૂ͍ • beginnerλάෑډ͕͘ɺॳOSSίϯτϦ Ϗϡʔγϣϯʹྑͦ͞͏ • Α͘͏gemͷissueͱ͔Λwatch͓ͯ͘͠ͱ ྑͦ͞͏
ࠓޙ • ͍ͭOSSʹ͓ੈʹͳͬͯΔ͠ɺؐݩͯ͠ ͍͖͍ͨ
·ͱΊ • rails-erdʹ͍ͭͯ • ERਤΛRailsͷίʔυ͔Βࣗಈੜ • OSS • PRνϟϯεͨ͘͞Μస͕ͬͯͦ͏
ίϚʔγϟϧ • We are hiring!!! - ΤϯδχΞืूதͰ͢ʂ ձһສਓಥഁʂ ࠃ/PͷΧδϡΞϧΪϑταʔϏε