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
flyway-play
Search
Toshiyuki Takahashi
August 01, 2015
Programming
2
2.1k
flyway-play
Toshiyuki Takahashi
August 01, 2015
Tweet
Share
More Decks by Toshiyuki Takahashi
See All by Toshiyuki Takahashi
Purely Functional Programming with Cats Effect 3 and Scala 3 [ScalaMatsuri2022]
tototoshi
0
5.6k
scala-ojisan
tototoshi
0
120
5年ぶりにPHPを書いた話
tototoshi
0
290
Steps to master the Play source code
tototoshi
1
460
Template Engines in Scala
tototoshi
1
3.8k
Play と Scala のこれまでとこれから
tototoshi
1
2.1k
Other Decks in Programming
See All in Programming
モバイルアプリにおける自動テストの導入戦略
ostk0069
0
110
Full stack testing :: basic to basic
up1
1
930
ブラウザ単体でmp4書き出すまで - muddy-web - 2024-12
yue4u
2
460
rails stats で紐解く ANDPAD のイマを支える技術たち
andpad
1
290
これでLambdaが不要に?!Step FunctionsのJSONata対応について
iwatatomoya
2
3.6k
RWC 2024 DICOM & ISO/IEC 2022
m_seki
0
200
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
useSyncExternalStoreを使いまくる
ssssota
6
1k
LLM Supervised Fine-tuningの理論と実践
datanalyticslabo
3
940
たのしいparse.y
ydah
3
120
Асинхронность неизбежна: как мы проектировали сервис уведомлений
lamodatech
0
630
Semantic Kernelのネイティブプラグインで知識拡張をしてみる
tomokusaba
0
180
Featured
See All Featured
The Pragmatic Product Professional
lauravandoore
32
6.3k
Fontdeck: Realign not Redesign
paulrobertlloyd
82
5.3k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Speed Design
sergeychernyshev
25
670
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
26
1.5k
Automating Front-end Workflow
addyosmani
1366
200k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Into the Great Unknown - MozCon
thekraken
33
1.5k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
A designer walks into a library…
pauljervisheath
204
24k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Transcript
qZXBZQMBZ &BTZ%BUBCBTF.JHSBUJPOGPS1MBZ TDBMBؔ4VNNJU
%BUBCBTFNJHSBUJPOJTEJGpDVMU
%# w .VUBCMF w MJLFBHMPCBMWBSJBCMFTUBUF
%&7TBZT w l4FUVQEBUBCBTFNBOVBMMZ z w l)PXUPSFWJFXDIBOHFT z w l8IPDIBOHFEUIJTTDIFNB z
w l*GUFTUECEJGGFSTGSPNQSPE QSPEJT UIFSFBMz
%#"TBZT w l*EPO`ULOPXNVDIBCPVUBQQz w l)FZ%&7 HJWFNF"-5&3TDSJQUz
%BUBCBTFNJHSBUJPOJTEJGpDVMU
(PBM w $PPQFSBUJPOCFUXFFO%&7BOE%#" w .BOBHFEBUBCBTFDIBOHFT
'MZXBZNBEFJUFBTZ
8IBUJT'MZXBZ
'MZXBZ w 0QFOTPVSDFEBUBCBTFNJHSBUJPOUPPM w 8SJUUFOJO+BWB w ;FSPSFRVJSFEEFQFOEFODJFTPUIFSUIBO +BWB BOE+%#$ w
4VQQPSU42-CBTFE+BWBCBTFE NJHSBUJPO w 1PSUBCMF
4VQQPSUFEEBUBCBTFT w 0SBDMF w .Z42- w 1PTUHSF42- w %# w
) w TPMJE%# w 42-4FSWFS w .BSJB%# w 7FSUJDB w %#[04 w )TRM w 42-"[VSF w (PPHMF$MPVE42- w "843FETIJGU w %FSCZ w 42-JUF
1PSUBCMF w .BWFO w TCU w (SBEMF w "OU w
$PNNBOE-JOF w +BWB"1*
$PNNBOET w NJHSBUF w DMFBO w SFQBJS w JOGP w
WBMJEBUF w CBTFMJOF
42-CBTFE.JHSBUJPO create table language ( id integer primary key, name
varchar(100) not null );
+BWBCBTFE.JHSBUJPO package db.migration.java import java.sql.Connection import org.flywaydb.core.api.migration.jdbc.JdbcMigration
class V1__Create_language_table extends JdbcMigration { override def migrate(conn: Connection): Unit = { conn.createStatement().executeUpdate( """create table language ( | id integer primary key, | name varchar(100) not null |);""".stripMargin) } }
IUUQXXXUIPVHIUXPSLTDPNSBEBSUPPMTqZXBZ ⚫"EPQU
8&# %#13&447PM +BWBͷ຺߭ʲୈճʳ 'MZXBZʹΑΔޮతͳ%#εΩʔϚཧ
8IBUJTqZXBZQMBZ
qZXBZQMBZ w 'MZXBZNPEVMFGPS1MBZ w QMBZqZXBZJTBWBJMBCMFGPS
libraryDependencies ++= Seq( "org.flywaydb" %% "flyway-play" % "2.1.0" ) play.modules.enabled
+= "org.flywaydb.play.PlayModule" CVJMETCU BQQMJDBUJPODPOG
8IZOPUQMBZFWPMVUJPOT
QMBZFWPMVUJPOT w EFQFOETPO1MBZ w JT XBT OPUDBQBCMFPGJOUFHSBUJOH XJUITPNFEBUBCBTFMJCSBSJFTUIBUEPO`U EFQFOEPOQMBZBQJEC w
JTOPUTPqFYJCMF
%JGGFSFODFGSPNQMBZFWPMVUJPOT
w 6QT%PXOT w .BSLFSDPNNFOU QMBZFWPMVUJPOT
qZXBZQMBZ w /Pb%PXOT`QBSU w 1MBJO42-
QMBZFWPMVUJPOT w TRM TRM TRM ʜ
qZXBZQMBZ w 0OFPSNPSFOVNFSJDQBSUT w 4FQBSBUFECZBEPU PSBO VOEFSTDPSF @
w 6OEFSTDPSFTBSFSFQMBDFECZEPUT BUSVOUJNF w -FBEJOH[FSPFTBSFJHOPSFEJOFBDI QBSU "WFSTJPONVTUIBWF UIFGPMMPXJOHTUSVDUVSF
qZXBZQMBZ w w w w @ BUSVOUJNF
w w w w w &YBNQMFTPGWBMJEWFSTJPO
QMBZFWPMVUJPOT TRM TRM DPOqJDUNFSHF TRM
QMBZFWPMVUJPOT
QMBZFWPMVUJPOT 7@@ʜʜTRM 7@@ʜʜTRM 7@@ʜʜTRM OPDPOqJDUT
5JQTVTFDBTFT
&NCFEJOZPVSBQQ w 'MZXBZIBT+BWB"1* w &B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