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
CIフレンドリなDBドキュメント生成ツールでドキュメントの最新を維持し続ける / phpcon...
Search
Ken’ichiro Oyama
June 16, 2018
Technology
3
3.7k
CIフレンドリなDBドキュメント生成ツールでドキュメントの最新を維持し続ける / phpconfuk_rej
【非公式】PHPカンファレンス福岡2018前夜祭リジェクトコン #phpconfuk_rej
Ken’ichiro Oyama
June 16, 2018
Tweet
Share
More Decks by Ken’ichiro Oyama
See All by Ken’ichiro Oyama
実践 net/http Middleware パターン / Kizuku.go Vol.1
k1low
1
180
Cleanup handling in Go / Go Conference 2024
k1low
6
3.1k
CI/CDがあたりまえの今の時代にAPIテスティングツールに求められていること / CI/CD Test Night #7
k1low
17
8.5k
Command-line interface tool design / PHPerKaigi 2024
k1low
8
2.8k
gostyle IS NOT Go Style / Fukuoka.go#19 Reboot
k1low
1
220
Parsing case study in Go / Go Conference mini 2023 Winter IN KYOTO
k1low
2
1.3k
APIシナリオテストツールとしてのrunn / 4 API testing tools
k1low
3
1.4k
The future of tbls and "Documentation as Code" / phpconfuk 2023
k1low
4
5.8k
net/http/httptest.Server のアプローチをテスト戦略に活用する / Go Conference 2023
k1low
9
2.9k
Other Decks in Technology
See All in Technology
OCI 運用監視サービス 概要
oracle4engineer
PRO
0
4.8k
複雑なState管理からの脱却
sansantech
PRO
1
150
The Role of Developer Relations in AI Product Success.
giftojabu1
0
130
サイバーセキュリティと認知バイアス:対策の隙を埋める心理学的アプローチ
shumei_ito
0
390
100 名超が参加した日経グループ横断の競技型 AWS 学習イベント「Nikkei Group AWS GameDay」の紹介/mediajaws202411
nikkei_engineer_recruiting
1
170
なぜ今 AI Agent なのか _近藤憲児
kenjikondobai
4
1.4k
Terraform Stacks入門 #HashiTalks
msato
0
350
リンクアンドモチベーション ソフトウェアエンジニア向け紹介資料 / Introduction to Link and Motivation for Software Engineers
lmi
4
300k
TanStack Routerに移行するのかい しないのかい、どっちなんだい! / Are you going to migrate to TanStack Router or not? Which one is it?
kaminashi
0
590
OCI Security サービス 概要
oracle4engineer
PRO
0
6.5k
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
110
iOSチームとAndroidチームでブランチ運用が違ったので整理してます
sansantech
PRO
0
140
Featured
See All Featured
Building Better People: How to give real-time feedback that sticks.
wjessup
364
19k
What's in a price? How to price your products and services
michaelherold
243
12k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
Art, The Web, and Tiny UX
lynnandtonic
297
20k
Docker and Python
trallard
40
3.1k
How to Ace a Technical Interview
jacobian
276
23k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.4k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Building Flexible Design Systems
yeseniaperezcruz
327
38k
Designing on Purpose - Digital PM Summit 2013
jponch
115
7k
Transcript
খࢁ݈Ұ(.01FQBCP *OD 1)1ΧϯϑΝϨϯεԬલࡇϦδΣΫτίϯ $*ϑϨϯυϦͳ%#υΩϡϝϯτੜπʔϧͰ υΩϡϝϯτͷ࠷৽Λҡ࣋͠ଓ͚Δ
γχΞΤϯδχΞ খࢁ݈Ұ!L-P8 ϗεςΟϯάࣄۀ෦ϗεςΟϯάάϧʔϓϚωʔδυΫϥυνʔϜ IUUQTHJUIVCDPNL-P8
օ͞ΜͷϓϩδΣΫτʹ σʔλϕʔεઃܭॻ&3ਤ ͋Γ·͔͢ʁ
ͦΕߋ৽͞Ε͍ͯ·͔͢ʁ ࠷৽ͷঢ়ଶͰ͔͢ʁ
࠷ۙࢲ͕+0*/ͨ͠ ͋ΔϓϩδΣΫτͷ߹
͋ΔϓϩδΣΫτ -0-*101ϚωʔδυΫϥυ ͷྫ wͷ͍͍͢͝ͰػೳՃվળ͕܁Γฦ͞Ε͍ͯͨ w͍ΘΏΔ5JFSͳ୯७ͳ8FCΞϓϦέʔγϣϯͳͲͰͳ͘ɺϩʔϧ ͚ͩͰऑ͋Δɺ͍ΘΏΔ.JDSPTFSWJDFͳߏ wͦͷ͏ͪॏཁͳঢ়ଶอ࣋Λ୲͏σʔλϕʔε͕ϩʔϧ wνʔϜϝϯόʔ͕༏लͰ͋Δ͜ͱ͔ΒσʔλϕʔεͷεΩʔϚมߋ ;͘Ίಉ࣌ฒߦతʹߦΘΕ͍ͯͨ
͋ΔϓϩδΣΫτ -0-*101ϚωʔδυΫϥυ ͷྫ wίʔυͷཧ(JU)VC ()& Ͱશͯཧ wΤϯδχΞ͚ͩͰͳ͘σβΠφʔσΟϨΫλʔ(JU)VC্Ͱ׆ಈ wϓϩδΣΫτΛߏ͢ΔϦϙδτϦෳ wϓϩάϥϛϯάݴޠͭͰͳ͘5ZQF4DSJQU(PͳͲෳ
͘ฒߦతͳ։ൃͷσʔλϕʔεεΩʔϚͷߋ৽՝ w୭͕σʔλϕʔεεΩʔϚͷશͯΛѲ͍ͯ͠Δঢ়گͰͳ͔ͬͨ w ʮ͜ͷΧϥϜͲΜͳ༻్ͰΘΕΔΜͰ͔͢ʁʢࣗʣʯ w 4MBDLͰؾܰʹ࣭Ͱ͖Δ͠ɺௐͨΒΘ͔Δɻ͔͠͠ϫϯςϯϙΕΔ w୭͕σʔλϕʔεεΩʔϚͷ࠷৽ͷঢ়ଶΛѲ͍ͯ͠Δঢ়گͰͳ ͔ͬͨ w ʮ͋ΕʁԶ͕࡞ͬͨϚΠάϨʔγϣϯ͕ద༻͞Εͯͳ͍ʯˠฒߦͰϚΠάϨʔγϣ
ϯ͕ൃੜ͢Δ1VMM3FRVFTU͕͋ͬͨ݁ՌɺϚΠάϨʔγϣϯπʔϧͷϑΝΠϧ໊ ͷλΠϜελϯϓνΣοΫͰඈ͞Ε͍ͯͨ
࠷ॳͷࣗͷ wνʔϜʹ+0*/͔ͨ͠ΓͰσʔλϕʔεͷશମ૾͕Θ͔Βͳ͔ͬͨ wͱΓ͋͑ͣ4DIBNB4QZΛͬͯखݩʹσʔλϕʔευΩϡϝϯτΛ ࡞ͯ֬͠ೝ͍ͯͨ͠ wIUUQTDIFNBTQZPSH wશςʔϒϧશΧϥϜʹ$0..&/5ΛՃ͢Δ1VMM3FRVFTUΛ͢ΔͳͲ wͱΓ͋͑ͣ҆৺
ͱ͜Ζ͕ɺ͋Δͱ͖
ϓϩμΫτΦʔφʔ ʮͲ͔͜ʹσʔλϕʔεઃܭॻͳ͍Ͱ͔͢Ͷʁʯ
ΤϯδχΞͰͳͯ͘42-Λۦ͢Δձࣾͩͬͨ wσʔλϕʔεΛѲ͍ͨ͠ͷΤϯδχΞ͚ͩͰͳ͔ͬͨ w։ൃ͍ͯ͠ΔΤϯδχΞσʔλϕʔεͷεΩʔϚʹ͍ͭͯ࠷৽Ͱ ͳ͍ʹͤΑѲ͍ͯ͠Δʢ͠ͳ͍ͱ։ൃͰ͖ͳ͍ʣ w࣭֬ೝΛ͢Δͱ͖ʹΞλϦ͕͚ͭΒΕΔ wීஈผͷ͜ͱΛߟ͑Δඞཁ͕͋ΔσΟϨΫλʔͦ͏Ͱͳ͍ w͜Εʢྑ͍ҙຯͰʣఆ֎ɺ͜ͷ··ͩͱϚζ͍͔
UCMT
UCMT wUCMTJTB$*'SJFOEMZUPPMGPSEPDVNFOUBEBUBCBTF XSJUUFOJO(P wIUUQTHJUIVCDPNL-P8UCMT w.BSLEPXO ('. ܗࣜͰσʔλϕʔευΩϡϝϯτΛੜͯ͘͠ΕΔ$-* πʔϧ w$*ϑϨϯυϦʔͳίϚϯυ͋Δʢޙड़
Πϯετʔϧ w)PNFCSFXͰΠϯετʔϧՄೳ $ go get -u github.com/k1LoW/tbls $
brew install k1LoW/tbls/tbls w(PͳͷͰHPHFUͰΠϯετʔϧͰ͖·͢
Φϓγϣϯ(SBQIWJ[ͷΠϯετʔϧ w&3ਤੜͷͨΊͷ(SBQIWJ[ΛΠϯετʔϧ͠·͢ $ brew install graphviz
AUCMTEPDAσʔλϕʔευΩϡϝϯτͷੜ wAUCMTEPDAίϚϯυͰσʔλϕʔεʹଓͯ͠υΩϡϝϯτΛੜ͠·͢ $ tbls doc mysql://user:pass@hostname:3306/dbname ./dbdoc
ͦͯ͠(JU)VCʹίϛοτ
None
4".1-&
.BSLEPXOͰ͋Δྑ͞ w(JU)VC্ͰࣗಈͰϨϯμϦϯά͞ΕΔ wJNH؆୯ʹઃஔͰ͖Δ wϚʔΫμϯͳͷͰHJUEJ⒎Ͱ͕ࠩΘ͔Γ͍͢ wεΩʔϚߋ৽༰͕Θ͔Γ͍͢
lEJ⒎z
AUCMTEJ⒎AυΩϡϝϯτͱσʔλϕʔεͷࠩ wAUCMTEPDAΛAUCMTEJ⒎Aʹม͑Δ͚ͩͰσʔλϕʔεʹଓͯ͠طଘͷ ੜࡁΈυΩϡϝϯτͱͷࠩΛग़ྗ͠·͢ʢ(SBQIWJ[Ͱग़ྗͨ͠&3ਤ Ҏ֎ʣ w͕ࠩͳ͍ͱ͖Կग़ྗ͠ͳ͍ $ tbls diff
mysql://user:pass@hostname:3306/dbname ./dbdoc
l͕ࠩͳ͍ͱ͖Կग़ྗ͠ͳ͍z
͜ͷΈΛͬͯ$*ʹΈࠐΉ
$*࿈ܞ wσʔλϕʔεΛ࣋ͭΞϓϦέʔγϣϯͷςετʹ࠷৽ʹϚΠάϨʔγϣ ϯ͞Εͨσʔλϕʔε͕༻ҙ͞Ε͍ͯΔͣɻ wͦͷσʔλϕʔεʹଓͯ͠AUCMTEJ⒎AΛ࣮ߦɺίϛοτࡁΈͷυΩϡϝ ϯτͷࠩΛ֬ೝɺ͕ࠩ͋ΕΤϥʔʹ͢Δɻ wUCMTίϚϯυ(PͳͷͰϫϯόΠφϦɻͭ·Γ$*ʹΈࠐΈ͍͢
ྫ͑ϫϯϥΠφʔ w5SBWJT$*$JSDMF$*ͷ:".-ϑΝΠϧʹهड़ͯ͠ར༻Ͱ͖·͢ script: - DIFF=`tbls diff mysql://user:pass@hostname:3306/ dbname
./dbdoc` && if [ ! -z "$DIFF" ]; then echo "document does not match database." >&2 ; tbls diff mysql://user:pass@hostname:3306/dbname ./dbdoc; exit 1; fi
ྫ͑.BLFpMF wANBLFEPDAͱANBLFUFTUEPDA doc: ## Document database schema tbls
doc mysql://user:pass@hostname:3306/dbname ./dbdoc testdoc: ## Test database schema document $(eval DIFF := $(shell tbls diff mysql:// user:pass@hostname:3306/dbname ./dbdoc)) @test -z "$(DIFF)" || (echo "document does not match database." && tbls diff mysql://user:pass@hostname:3306/ dbname ./dbdoc && exit 1)
$*ϑϨϯυϦʔ
͞Βʹ
ABEEAϦϨʔγϣϯɺίϝϯτͷิ wUCMT',ΛΈͯϦϨʔγϣϯΛఆͯ͠&3ਤΛ࡞͢Δ w͔͠͠ɺੈͷதʹ',͕ͬͯͳ͍σʔλϕʔε͋ΔʢΩʔϨεΤϯ τϦʣ wӡ༻தͷσʔλϕʔεʹ$0..&/5ͷߋ৽ͷͨΊʹ"-5&3ͨ͘͠ͳ͍ wͦͷͨΊʹABEEAΦϓγϣϯͰ:".-ϑΝΠϧΛࢦఆ͢Δ͜ͱͰϦϨʔ γϣϯɺίϝϯτͷิ͕Ͱ͖·͢
ίϚϯυͰυΩϡϝϯτੜ ίϚϯυͰυΩϡϝϯτςετ
.Z42- 1PTUHSF42-
σʔλϕʔε υΩϡϝϯτ͕ͳ͍ υΩϡϝϯτ͕࠷৽Ͱͳ͍ ϓϩδΣΫτΛ ໓͢Δͧʂʂ
5IBOLZPV ࠷৽ͷ࠾༻ใΛνΣοΫˠ !QC@SFDSVJU