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
6.8k
scala-ojisan
tototoshi
0
130
5年ぶりにPHPを書いた話
tototoshi
0
320
Steps to master the Play source code
tototoshi
1
500
Template Engines in Scala
tototoshi
1
3.9k
Play と Scala のこれまでとこれから
tototoshi
1
2.1k
Other Decks in Programming
See All in Programming
The State of Fluid (2025)
s2b
0
200
Claude Codeで挑むOSSコントリビュート
eycjur
0
180
「リーダーは意思決定する人」って本当?~ 学びを現場で活かす、リーダー4ヶ月目の試行錯誤 ~
marina1017
0
240
AIコーディングAgentとの向き合い方
eycjur
0
220
未来を拓くAI技術〜エージェント開発とAI駆動開発〜
leveragestech
2
180
サイトを作ったらNFCタグキーホルダーを爆速で作れ!
yuukis
0
490
AWS Serverless Application Model入門_20250708
smatsuzaki
0
130
Claude Codeで実装以外の開発フロー、どこまで自動化できるか?失敗と成功
ndadayo
2
1.3k
コンテキストエンジニアリング Cursor編
kinopeee
1
700
大規模FlutterプロジェクトのCI実行時間を約8割削減した話
teamlab
PRO
0
490
Microsoft Orleans, Daprのアクターモデルを使い効率的に開発、デプロイを行うためのSekibanの試行錯誤 / Sekiban: Exploring Efficient Development and Deployment with Microsoft Orleans and Dapr Actor Models
tomohisa
0
210
The state patternの実践 個人開発で培ったpractice集
miyanokomiya
0
150
Featured
See All Featured
Bash Introduction
62gerente
614
210k
Docker and Python
trallard
45
3.5k
How to train your dragon (web standard)
notwaldorf
96
6.2k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
15
1.6k
Site-Speed That Sticks
csswizardry
10
780
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.8k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Scaling GitHub
holman
462
140k
Learning to Love Humans: Emotional Interface Design
aarron
273
40k
Statistics for Hackers
jakevdp
799
220k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
BBQ
matthewcrist
89
9.8k
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 OPD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