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.6k
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
140
Cleanup handling in Go / Go Conference 2024
k1low
6
2.8k
CI/CDがあたりまえの今の時代にAPIテスティングツールに求められていること / CI/CD Test Night #7
k1low
17
7.2k
Command-line interface tool design / PHPerKaigi 2024
k1low
8
2.5k
gostyle IS NOT Go Style / Fukuoka.go#19 Reboot
k1low
1
190
Parsing case study in Go / Go Conference mini 2023 Winter IN KYOTO
k1low
2
1.2k
APIシナリオテストツールとしてのrunn / 4 API testing tools
k1low
2
1.3k
The future of tbls and "Documentation as Code" / phpconfuk 2023
k1low
3
5k
net/http/httptest.Server のアプローチをテスト戦略に活用する / Go Conference 2023
k1low
9
2.8k
Other Decks in Technology
See All in Technology
Azure Cosmos DB での時系列ログの運用と改善
sansantech
PRO
0
190
Binary Authorizationと友達になろう / Let's be friends with Binary Authorization
iselegant
2
130
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
1
160
Cloudflareスタックで月間1200万UUの経済メディアにアバター画像生成サービスを作る / Cloudflare Developer Platform for AI avatar service
nkzn
7
1.7k
チームが自己組織化してから敢えて専任スクラムマスターを置いてみたらめちゃめちゃワークした話 / How bringing in a Scrum Master to an already self-organized team totally worked out
hc0208
2
1.5k
ログラスが面白いと思う理由をマネージャーがエモく語ってみる / 20240829 vs LT
yoshikiiida
1
510
【Λ(らむだ)最近のアプデ情報 / RPALT20240904
lambda
0
160
New Relicで実践する外形監視
aeonpeople
1
110
20240828_EM_Fest
kzkmaeda
4
360
分野に潜むツールの紹介
pojiro
1
330
20240825_bedrock_helpdesk_jp.pdf
gamogamo
0
130
PlaywrightによるE2Eテスト入門 / Introduction to E2E Testing with Playwright
rhumie
3
840
Featured
See All Featured
Designing for humans not robots
tammielis
248
25k
Fantastic passwords and where to find them - at NoRuKo
philnash
47
2.7k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
157
15k
Embracing the Ebb and Flow
colly
83
4.4k
Debugging Ruby Performance
tmm1
72
12k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
34
1.9k
From Idea to $5000 a Month in 5 Months
shpigford
378
46k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Put a Button on it: Removing Barriers to Going Fast.
kastner
58
3.4k
The Language of Interfaces
destraynor
153
23k
How STYLIGHT went responsive
nonsquared
93
5.1k
Design by the Numbers
sachag
277
19k
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