Slide 1

Slide 1 text

Agile Database Development David E. Wheeler PGCon 2013 Ottawa Text: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ Images licensed independently and © Their respective owners. iovation 1 Wednesday, May 22, 13

Slide 2

Slide 2 text

Agile Database Development David E. Wheeler PGCon 2013 Ottawa Text: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ Images licensed independently and © Their respective owners. ✘ iovation 1 Wednesday, May 22, 13

Slide 3

Slide 3 text

David E. Wheeler PGCon 2013 Ottawa Text: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ Images licensed independently and © Their respective owners. 1 Wednesday, May 22, 13

Slide 4

Slide 4 text

David E. Wheeler PGCon 2013 Ottawa License: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ 2 Wednesday, May 22, 13

Slide 5

Slide 5 text

Build My VC-Funded App for Me for Free David E. Wheeler PGCon 2013 Ottawa License: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ ✔ CEO, Data Architect Agile Assholes, Inc. 2 Wednesday, May 22, 13

Slide 6

Slide 6 text

This is Genius 3 Wednesday, May 22, 13

Slide 7

Slide 7 text

This is Genius I had this idea 3 Wednesday, May 22, 13

Slide 8

Slide 8 text

This is Genius I had this idea Social networking is HAWT 3 Wednesday, May 22, 13

Slide 9

Slide 9 text

This is Genius I had this idea Social networking is HAWT Has been for waaaay too long 3 Wednesday, May 22, 13

Slide 10

Slide 10 text

This is Genius I had this idea Social networking is HAWT Has been for waaaay too long The backlash is long overdue 3 Wednesday, May 22, 13

Slide 11

Slide 11 text

This is Genius I had this idea Social networking is HAWT Has been for waaaay too long The backlash is long overdue Getting ahead of the curve 3 Wednesday, May 22, 13

Slide 12

Slide 12 text

This is Genius I had this idea Social networking is HAWT Has been for waaaay too long The backlash is long overdue Getting ahead of the curve Introducing… 3 Wednesday, May 22, 13

Slide 13

Slide 13 text

http:/ /flic.kr/p/8j5gG8 © 2010 Strongrrl. All rights reserved. Used with permission. 4 Wednesday, May 22, 13

Slide 14

Slide 14 text

antisocial network http:/ /flic.kr/p/8j5gG8 © 2010 Strongrrl. All rights reserved. Used with permission. 4 Wednesday, May 22, 13

Slide 15

Slide 15 text

How it Works antisocial network 5 Wednesday, May 22, 13

Slide 16

Slide 16 text

How it Works Microblogging platform antisocial network 5 Wednesday, May 22, 13

Slide 17

Slide 17 text

How it Works Microblogging platform Everyone follows you antisocial network 5 Wednesday, May 22, 13

Slide 18

Slide 18 text

How it Works Microblogging platform Everyone follows you New users follow everyone antisocial network 5 Wednesday, May 22, 13

Slide 19

Slide 19 text

How it Works Microblogging platform Everyone follows you New users follow everyone Goal: Alienate your followers antisocial network 5 Wednesday, May 22, 13

Slide 20

Slide 20 text

How it Works Microblogging platform Everyone follows you New users follow everyone Goal: Alienate your followers Get them to unfollow you antisocial network 5 Wednesday, May 22, 13

Slide 21

Slide 21 text

How it Works Microblogging platform Everyone follows you New users follow everyone Goal: Alienate your followers Get them to unfollow you Leaderboard: Those with fewest followers antisocial network 5 Wednesday, May 22, 13

Slide 22

Slide 22 text

Your Task antisocial network 6 Wednesday, May 22, 13

Slide 23

Slide 23 text

Your Task Create the database antisocial network 6 Wednesday, May 22, 13

Slide 24

Slide 24 text

Your Task Create the database Use agile development to make it right antisocial network 6 Wednesday, May 22, 13

Slide 25

Slide 25 text

Your Task Create the database Use agile development to make it right Contribute to VC-funded Corp antisocial network 6 Wednesday, May 22, 13

Slide 26

Slide 26 text

Your Task Create the database Use agile development to make it right Contribute to VC-funded Corp Profit! antisocial network 6 Wednesday, May 22, 13

Slide 27

Slide 27 text

Your Task Create the database Use agile development to make it right Contribute to VC-funded Corp Profit! For VC-funded Corp antisocial network 6 Wednesday, May 22, 13

Slide 28

Slide 28 text

http:/ /flic.kr/p/2honiQ © 2007 James Duncan Davidson. All rights reserved. Used with permission. 7 Wednesday, May 22, 13

Slide 29

Slide 29 text

antisocial network 8 Wednesday, May 22, 13

Slide 30

Slide 30 text

Agile WTF? antisocial network 8 Wednesday, May 22, 13

Slide 31

Slide 31 text

We’ll get there antisocial network 9 Wednesday, May 22, 13

Slide 32

Slide 32 text

But first… antisocial network 10 Wednesday, May 22, 13

Slide 33

Slide 33 text

NDA antisocial network 11 Wednesday, May 22, 13

Slide 34

Slide 34 text

Okay, now that that’s out of the way… antisocial network 12 Wednesday, May 22, 13

Slide 35

Slide 35 text

Please organize into pairs antisocial network 13 Wednesday, May 22, 13

Slide 36

Slide 36 text

Yes, that’s right antisocial network 14 Wednesday, May 22, 13

Slide 37

Slide 37 text

You’re gonna do pair database programming antisocial network 15 Wednesday, May 22, 13

Slide 38

Slide 38 text

App developers partner with DBAs antisocial network 16 Wednesday, May 22, 13

Slide 39

Slide 39 text

I’m waiting… antisocial network 17 Wednesday, May 22, 13

Slide 40

Slide 40 text

Job Requirements antisocial network 18 Wednesday, May 22, 13

Slide 41

Slide 41 text

Job Requirements PostgreSQL http:/ /postgresql.org/download antisocial network 18 Wednesday, May 22, 13

Slide 42

Slide 42 text

Job Requirements PostgreSQL http:/ /postgresql.org/download Git http:/ /git-scm.com/ antisocial network 18 Wednesday, May 22, 13

Slide 43

Slide 43 text

Job Requirements PostgreSQL http:/ /postgresql.org/download Git http:/ /git-scm.com/ Sqitch http:/ /sqitch.org/ antisocial network 18 Wednesday, May 22, 13

Slide 44

Slide 44 text

Job Requirements PostgreSQL http:/ /postgresql.org/download Git http:/ /git-scm.com/ Sqitch http:/ /sqitch.org/ pgTAP http:/ /pgtap.org/ antisocial network 18 Wednesday, May 22, 13

Slide 45

Slide 45 text

Job Requirements PostgreSQL http:/ /postgresql.org/download Git http:/ /git-scm.com/ Sqitch http:/ /sqitch.org/ pgTAP http:/ /pgtap.org/ pg_prove http:/ /metacpan.org/module/pg_prove antisocial network 18 Wednesday, May 22, 13

Slide 46

Slide 46 text

We good? antisocial network 19 Wednesday, May 22, 13

Slide 47

Slide 47 text

Let’s do this thang. antisocial network 20 Wednesday, May 22, 13

Slide 48

Slide 48 text

> Who Am I? 21 Wednesday, May 22, 13

Slide 49

Slide 49 text

""git"config"**global"user.name"'David"E."Wheeler' > > Who Am I? 21 Wednesday, May 22, 13

Slide 50

Slide 50 text

""git"config"**global"user.name"'David"E."Wheeler' > > Who Am I? 21 Wednesday, May 22, 13

Slide 51

Slide 51 text

""git"config"**global"user.name"'David"E."Wheeler' > ""git"config"**global"user.email"[email protected] > > Who Am I? 21 Wednesday, May 22, 13

Slide 52

Slide 52 text

""git"config"**global"user.name"'David"E."Wheeler' > ""git"config"**global"user.email"[email protected] > > Who Am I? 21 Wednesday, May 22, 13

Slide 53

Slide 53 text

""git"config"**global"user.name"'David"E."Wheeler' > ""git"config"**global"user.email"[email protected] > > Who Am I? Please use your own name and email. 21 Wednesday, May 22, 13

Slide 54

Slide 54 text

""git"config"**global"user.name"'David"E."Wheeler' > ""git"config"**global"user.email"[email protected] > > Who Am I? ""emacs"~/.gitconfig > 21 Wednesday, May 22, 13

Slide 55

Slide 55 text

~/.gitconfig ~/ .gitconfig [user] "" name"="David"E."Wheeler """ email"="[email protected] 22 Wednesday, May 22, 13

Slide 56

Slide 56 text

~/.gitconfig ~/ .gitconfig [user] "" name"="David"E."Wheeler """ email"="[email protected] Good for all projects 22 Wednesday, May 22, 13

Slide 57

Slide 57 text

Create a Remote 23 Wednesday, May 22, 13

Slide 58

Slide 58 text

Create a Remote Create Git project on GitHub 23 Wednesday, May 22, 13

Slide 59

Slide 59 text

Create a Remote Create Git project on GitHub Or BitBucket 23 Wednesday, May 22, 13

Slide 60

Slide 60 text

Create a Remote Create Git project on GitHub Or BitBucket Wherever you like 23 Wednesday, May 22, 13

Slide 61

Slide 61 text

Create a Remote Create Git project on GitHub Or BitBucket Wherever you like Record remote URL 23 Wednesday, May 22, 13

Slide 62

Slide 62 text

Create a Remote Create Git project on GitHub Or BitBucket Wherever you like Record remote URL 23 Wednesday, May 22, 13

Slide 63

Slide 63 text

Or a Local Remote > 24 Wednesday, May 22, 13

Slide 64

Slide 64 text

Or a Local Remote ""mkdir"flipr*remote >"cd"flipr*remote > > 24 Wednesday, May 22, 13

Slide 65

Slide 65 text

Or a Local Remote ""mkdir"flipr*remote >"cd"flipr*remote > ""git"init"**bare Initialized"empty"Git"repository"in"flipr*remote/ > > 24 Wednesday, May 22, 13

Slide 66

Slide 66 text

Or a Local Remote ""mkdir"flipr*remote >"cd"flipr*remote > ""git"init"**bare Initialized"empty"Git"repository"in"flipr*remote/ > > Remote URL is simply the path to this directory. 24 Wednesday, May 22, 13

Slide 67

Slide 67 text

Or a Local Remote ""mkdir"flipr*remote >"cd"flipr*remote > ""git"init"**bare Initialized"empty"Git"repository"in"flipr*remote/ > > ""cd".. > 24 Wednesday, May 22, 13

Slide 68

Slide 68 text

Gitiup > 25 Wednesday, May 22, 13

Slide 69

Slide 69 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > 25 Wednesday, May 22, 13

Slide 70

Slide 70 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > 25 Wednesday, May 22, 13

Slide 71

Slide 71 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > ""echo"Flipr"Database"Project">"README.md > 25 Wednesday, May 22, 13

Slide 72

Slide 72 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > ""echo"Flipr"Database"Project">"README.md > ""git"add". > 25 Wednesday, May 22, 13

Slide 73

Slide 73 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > ""echo"Flipr"Database"Project">"README.md > ""git"add". > ""git"commit"*m"'Initialize"repo,"add"README.' [master"(root*commit)"2c4b510]"Initialize"repo,"add"README. 1"file"changed,"1"insertion(+) "create"mode"100644"README.md > 25 Wednesday, May 22, 13

Slide 74

Slide 74 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > ""echo"Flipr"Database"Project">"README.md > ""git"add". > ""git"commit"*m"'Initialize"repo,"add"README.' [master"(root*commit)"2c4b510]"Initialize"repo,"add"README. 1"file"changed,"1"insertion(+) "create"mode"100644"README.md > 25 Wednesday, May 22, 13

Slide 75

Slide 75 text

""mkdir"flipr*db >"cd"flipr*db >"git"init Initialized"empty"Git"repository"in"flipr*db/.git/ > Gitiup > ""echo"Flipr"Database"Project">"README.md > ""git"add". > ""git"commit"*m"'Initialize"repo,"add"README.' [master"(root*commit)"2c4b510]"Initialize"repo,"add"README. 1"file"changed,"1"insertion(+) "create"mode"100644"README.md > We have a Git repo. 25 Wednesday, May 22, 13

Slide 76

Slide 76 text

> Origin 26 Wednesday, May 22, 13

Slide 77

Slide 77 text

""git"remote"add"origin"../flipr*remote > > Origin 26 Wednesday, May 22, 13

Slide 78

Slide 78 text

""git"remote"add"origin"../flipr*remote > > Origin Or remote URL 26 Wednesday, May 22, 13

Slide 79

Slide 79 text

""git"push"*u"origin"master Counting"objects:"3,"done. Writing"objects:"100%"(3/3),"260"bytes,"done. Total"3"(delta"0),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""master"*>"master Branch"master"set"up"to"track"remote"branch"master"from" origin. > ""git"remote"add"origin"../flipr*remote > > Origin 26 Wednesday, May 22, 13

Slide 80

Slide 80 text

""git"push"*u"origin"master Counting"objects:"3,"done. Writing"objects:"100%"(3/3),"260"bytes,"done. Total"3"(delta"0),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""master"*>"master Branch"master"set"up"to"track"remote"branch"master"from" origin. > ""git"remote"add"origin"../flipr*remote > > Origin 26 Wednesday, May 22, 13

Slide 81

Slide 81 text

""git"push"*u"origin"master Counting"objects:"3,"done. Writing"objects:"100%"(3/3),"260"bytes,"done. Total"3"(delta"0),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""master"*>"master Branch"master"set"up"to"track"remote"branch"master"from" origin. > ""git"remote"add"origin"../flipr*remote > > Origin 26 Wednesday, May 22, 13

Slide 82

Slide 82 text

""git"push"*u"origin"master Counting"objects:"3,"done. Writing"objects:"100%"(3/3),"260"bytes,"done. Total"3"(delta"0),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""master"*>"master Branch"master"set"up"to"track"remote"branch"master"from" origin. > ""git"remote"add"origin"../flipr*remote > > Origin 26 Wednesday, May 22, 13

Slide 83

Slide 83 text

Swimming Upstream > 27 Wednesday, May 22, 13

Slide 84

Slide 84 text

""git"remote"add"upstream"\ ""https://github.com/theory/agile*flipr.git > Swimming Upstream > 27 Wednesday, May 22, 13

Slide 85

Slide 85 text

""git"remote"add"upstream"\ ""https://github.com/theory/agile*flipr.git > Swimming Upstream > ""git"fetch"upstream From"https://github.com/theory/agile*flipr "*"[new"branch]""""""flips""""""*>"upstream/flips "*"[new"branch]""""""master"""""*>"upstream/master "*"[new"branch]""""""userfuncs""*>"upstream/userfuncs "*"[new"branch]""""""users""""""*>"upstream/users "*"[new"tag]"""""""""insert_user"*>"insert_user "*"[new"tag]"""""""""appschema"*>"appschema "*"[new"tag]"""""""""v1.0.0*r1""*>"v1.0.0*r1 "*"[new"tag]"""""""""reltag"""""*>"reltag "*"[new"tag]"""""""""insert_user2"*>"insert_user2 > 27 Wednesday, May 22, 13

Slide 86

Slide 86 text

""git"remote"add"upstream"\ ""https://github.com/theory/agile*flipr.git > Swimming Upstream > ""git"fetch"upstream From"https://github.com/theory/agile*flipr "*"[new"branch]""""""flips""""""*>"upstream/flips "*"[new"branch]""""""master"""""*>"upstream/master "*"[new"branch]""""""userfuncs""*>"upstream/userfuncs "*"[new"branch]""""""users""""""*>"upstream/users "*"[new"tag]"""""""""insert_user"*>"insert_user "*"[new"tag]"""""""""appschema"*>"appschema "*"[new"tag]"""""""""v1.0.0*r1""*>"v1.0.0*r1 "*"[new"tag]"""""""""reltag"""""*>"reltag "*"[new"tag]"""""""""insert_user2"*>"insert_user2 > For resetting later 27 Wednesday, May 22, 13

Slide 87

Slide 87 text

Git? antisocial network 28 Wednesday, May 22, 13

Slide 88

Slide 88 text

Git? Manage tree of files over time antisocial network 28 Wednesday, May 22, 13

Slide 89

Slide 89 text

Git? Manage tree of files over time Distributed development antisocial network 28 Wednesday, May 22, 13

Slide 90

Slide 90 text

Git? Manage tree of files over time Distributed development Commit changes locally antisocial network 28 Wednesday, May 22, 13

Slide 91

Slide 91 text

Git? Manage tree of files over time Distributed development Commit changes locally Merge to remote (origin, upstream) antisocial network 28 Wednesday, May 22, 13

Slide 92

Slide 92 text

Git? Manage tree of files over time Distributed development Commit changes locally Merge to remote (origin, upstream) Speedy, responsive antisocial network 28 Wednesday, May 22, 13

Slide 93

Slide 93 text

Git? Manage tree of files over time Distributed development Commit changes locally Merge to remote (origin, upstream) Speedy, responsive Flexible, robust antisocial network 28 Wednesday, May 22, 13

Slide 94

Slide 94 text

Why Git? antisocial network 29 Wednesday, May 22, 13

Slide 95

Slide 95 text

Why Git? Anyone can clone antisocial network 29 Wednesday, May 22, 13

Slide 96

Slide 96 text

Why Git? Anyone can clone Complete repository copy antisocial network 29 Wednesday, May 22, 13

Slide 97

Slide 97 text

Why Git? Anyone can clone Complete repository copy Cheap branching antisocial network 29 Wednesday, May 22, 13

Slide 98

Slide 98 text

Why Git? Anyone can clone Complete repository copy Cheap branching Make and test local changes antisocial network 29 Wednesday, May 22, 13

Slide 99

Slide 99 text

Why Git? Anyone can clone Complete repository copy Cheap branching Make and test local changes Submit patches, pull requests antisocial network 29 Wednesday, May 22, 13

Slide 100

Slide 100 text

Why Git? Anyone can clone Complete repository copy Cheap branching Make and test local changes Submit patches, pull requests Pull from upstream antisocial network 29 Wednesday, May 22, 13

Slide 101

Slide 101 text

PiSHA1 antisocial network 30 Wednesday, May 22, 13

Slide 102

Slide 102 text

PiSHA1 SHA1 ID for every object antisocial network 30 Wednesday, May 22, 13

Slide 103

Slide 103 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob antisocial network 30 Wednesday, May 22, 13

Slide 104

Slide 104 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: antisocial network 30 Wednesday, May 22, 13

Slide 105

Slide 105 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: tree ID antisocial network 30 Wednesday, May 22, 13

Slide 106

Slide 106 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: tree ID parent ID antisocial network 30 Wednesday, May 22, 13

Slide 107

Slide 107 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: tree ID parent ID author antisocial network 30 Wednesday, May 22, 13

Slide 108

Slide 108 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: tree ID parent ID author committer antisocial network 30 Wednesday, May 22, 13

Slide 109

Slide 109 text

PiSHA1 SHA1 ID for every object commit, tag, tree, blob Hashed commit text includes: tree ID parent ID author committer message antisocial network 30 Wednesday, May 22, 13

Slide 110

Slide 110 text

> Making a hash of it 31 Wednesday, May 22, 13

Slide 111

Slide 111 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 112

Slide 112 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 113

Slide 113 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 114

Slide 114 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 115

Slide 115 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 116

Slide 116 text

> ""git"cat*file"commit"HEAD tree"8b0955fd015782a26953e20d41db5fadbb347c14 parent"0f38581c4d19313d910c2080b3470cae07f3694e author"David"Wheeler""1367971872"*0700 committer"David"Wheeler""1367971872"*0700 Get"through""Ship"it!". > Making a hash of it 31 Wednesday, May 22, 13

Slide 117

Slide 117 text

SHAzam! antisocial network 32 Wednesday, May 22, 13

Slide 118

Slide 118 text

SHAzam! Each commit (except first) includes parent antisocial network 32 Wednesday, May 22, 13

Slide 119

Slide 119 text

SHAzam! Each commit (except first) includes parent Can trace from any commit to the beginning antisocial network 32 Wednesday, May 22, 13

Slide 120

Slide 120 text

SHAzam! Each commit (except first) includes parent Can trace from any commit to the beginning Tampering (corruption) detectable antisocial network 32 Wednesday, May 22, 13

Slide 121

Slide 121 text

SHAzam! Each commit (except first) includes parent Can trace from any commit to the beginning Tampering (corruption) detectable Because the hash will be wrong antisocial network 32 Wednesday, May 22, 13

Slide 122

Slide 122 text

SHAzam! Each commit (except first) includes parent Can trace from any commit to the beginning Tampering (corruption) detectable Because the hash will be wrong Linus Torvalds’s “greatest invention” http:/ /perl.plover.com/yak/git/ antisocial network 32 Wednesday, May 22, 13

Slide 123

Slide 123 text

antisocial network Your Turn 33 Wednesday, May 22, 13

Slide 124

Slide 124 text

antisocial network Your Turn Configure Git 33 Wednesday, May 22, 13

Slide 125

Slide 125 text

antisocial network Your Turn Configure Git Initialize repository 33 Wednesday, May 22, 13

Slide 126

Slide 126 text

antisocial network Your Turn Configure Git Initialize repository Add origin remote 33 Wednesday, May 22, 13

Slide 127

Slide 127 text

antisocial network Your Turn Configure Git Initialize repository Add origin remote Add upstream remote 33 Wednesday, May 22, 13

Slide 128

Slide 128 text

antisocial network Your Turn Configure Git Initialize repository Add origin remote Add upstream remote https:/ /github.com/ theory/agile-flipr.git 33 Wednesday, May 22, 13

Slide 129

Slide 129 text

Who am I again? > 34 Wednesday, May 22, 13

Slide 130

Slide 130 text

Who am I again? ""sqitch"config"**user"user.name"'David"E."Wheeler' > > 34 Wednesday, May 22, 13

Slide 131

Slide 131 text

Who am I again? ""sqitch"config"**user"user.name"'David"E."Wheeler' > > 34 Wednesday, May 22, 13

Slide 132

Slide 132 text

Who am I again? ""sqitch"config"**user"user.email"[email protected] > ""sqitch"config"**user"user.name"'David"E."Wheeler' > > 34 Wednesday, May 22, 13

Slide 133

Slide 133 text

Who am I again? ""sqitch"config"**user"user.email"[email protected] > ""sqitch"config"**user"core.pg.client"/opt/local/pgsql/bin/psql > ""sqitch"config"**user"user.name"'David"E."Wheeler' > > 34 Wednesday, May 22, 13

Slide 134

Slide 134 text

Who am I again? ""sqitch"config"**user"user.email"[email protected] > ""sqitch"config"**user"core.pg.client"/opt/local/pgsql/bin/psql > ""sqitch"config"**user"user.name"'David"E."Wheeler' > ""emacs"~/.sqitch/sqitch.conf > > 34 Wednesday, May 22, 13

Slide 135

Slide 135 text

~/.sqitch/sqitc ~/ .sqitch/sqitch.conf [core""pg"] " client"="/opt/local/pgsql/bin/psql [user] "" name"="David"E."Wheeler """ email"="[email protected] 35 Wednesday, May 22, 13

Slide 136

Slide 136 text

~/.sqitch/sqitc ~/ .sqitch/sqitch.conf [core""pg"] " client"="/opt/local/pgsql/bin/psql [user] "" name"="David"E."Wheeler """ email"="[email protected] Good for all projects 35 Wednesday, May 22, 13

Slide 137

Slide 137 text

> Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 138

Slide 138 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 139

Slide 139 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 140

Slide 140 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch Use remote URL 36 Wednesday, May 22, 13

Slide 141

Slide 141 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 142

Slide 142 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 143

Slide 143 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 144

Slide 144 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 145

Slide 145 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch 36 Wednesday, May 22, 13

Slide 146

Slide 146 text

>"sqitch"**engine"pg"init"flipr"\ ""**uri"file://../flipr*remote Created"sqitch.conf Created"sqitch.plan Created"deploy/ Created"revert/ Created"verify/ > > Scratch that Sqitch ""emacs"sqitch.conf > 36 Wednesday, May 22, 13

Slide 147

Slide 147 text

sqitch.conf sqitch.conf [core] " engine"="pg " #"plan_file"="sqitch.plan " #"top_dir"=". " #"deploy_dir"="deploy " #"revert_dir"="revert " #"verify_dir"="verify " #"extension"="sql #"[core""pg"] " #"client"="/usr/local/pgsql/bin/psql " #"username"=" " #"password"=" " #"db_name"=" " #"host"=" " #"port"=" " #"sqitch_schema"="sqitch 37 Wednesday, May 22, 13

Slide 148

Slide 148 text

sqitch.conf sqitch.conf [core] " engine"="pg " #"plan_file"="sqitch.plan " #"top_dir"=". " #"deploy_dir"="deploy " #"revert_dir"="revert " #"verify_dir"="verify " #"extension"="sql #"[core""pg"] " #"client"="/usr/local/pgsql/bin/psql " #"username"=" " #"password"=" " #"db_name"=" " #"host"=" " #"port"=" " #"sqitch_schema"="sqitch --engine pg 37 Wednesday, May 22, 13

Slide 149

Slide 149 text

What’s the Plan Man? > 38 Wednesday, May 22, 13

Slide 150

Slide 150 text

What’s the Plan Man? ""emacs"sqitch.plan > > 38 Wednesday, May 22, 13

Slide 151

Slide 151 text

sqitch.plan sqitch.plan %syntax*version=1.0.0*b1 %project=flipr %uri=file://../flipr*remote 39 Wednesday, May 22, 13

Slide 152

Slide 152 text

sqitch.plan sqitch.plan %syntax*version=1.0.0*b1 %project=flipr %uri=file://../flipr*remote Identified 39 Wednesday, May 22, 13

Slide 153

Slide 153 text

Make It So > 40 Wednesday, May 22, 13

Slide 154

Slide 154 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > 40 Wednesday, May 22, 13

Slide 155

Slide 155 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > 40 Wednesday, May 22, 13

Slide 156

Slide 156 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > 40 Wednesday, May 22, 13

Slide 157

Slide 157 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > ""git"push Counting"objects:"5,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(4/4),"done. Writing"objects:"100%"(4/4),"564"bytes,"done. Total"4"(delta"0),"reused"0"(delta"0) To"../flipr*remote """7d28be0..297c07d""master"*>"master > 40 Wednesday, May 22, 13

Slide 158

Slide 158 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > ""git"push Counting"objects:"5,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(4/4),"done. Writing"objects:"100%"(4/4),"564"bytes,"done. Total"4"(delta"0),"reused"0"(delta"0) To"../flipr*remote """7d28be0..297c07d""master"*>"master > 40 Wednesday, May 22, 13

Slide 159

Slide 159 text

Make It So > ""git"add". >"git"commit"*m"'Initialize"Sqitch"configuration.' [master"297c07d]"Initialize"Sqitch"configuration. "2"files"changed,"20"insertions(+) "create"mode"100644"sqitch.conf "create"mode"100644"sqitch.plan > ""git"push Counting"objects:"5,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(4/4),"done. Writing"objects:"100%"(4/4),"564"bytes,"done. Total"4"(delta"0),"reused"0"(delta"0) To"../flipr*remote """7d28be0..297c07d""master"*>"master > 40 Wednesday, May 22, 13

Slide 160

Slide 160 text

Where’ve We Been? > 41 Wednesday, May 22, 13

Slide 161

Slide 161 text

""git"log commit"a4f765f88c1875ffe9427e73f72a6b66ce363ed4 Author:"David"E."Wheeler" Date:"""Tue"May"21"15:00:33"2013"*0400 """"Initialize"Sqitch"configuration. commit"2c4b51017929634a30f4a74e20268c05effdfcb3 Author:"David"E."Wheeler" Date:"""Tue"May"21"14:59:16"2013"*0400 """"Initialize"repo,"add"README. > Where’ve We Been? > 41 Wednesday, May 22, 13

Slide 162

Slide 162 text

""git"log commit"a4f765f88c1875ffe9427e73f72a6b66ce363ed4 Author:"David"E."Wheeler" Date:"""Tue"May"21"15:00:33"2013"*0400 """"Initialize"Sqitch"configuration. commit"2c4b51017929634a30f4a74e20268c05effdfcb3 Author:"David"E."Wheeler" Date:"""Tue"May"21"14:59:16"2013"*0400 """"Initialize"repo,"add"README. > Where’ve We Been? > 41 Wednesday, May 22, 13

Slide 163

Slide 163 text

""git"log commit"a4f765f88c1875ffe9427e73f72a6b66ce363ed4 Author:"David"E."Wheeler" Date:"""Tue"May"21"15:00:33"2013"*0400 """"Initialize"Sqitch"configuration. commit"2c4b51017929634a30f4a74e20268c05effdfcb3 Author:"David"E."Wheeler" Date:"""Tue"May"21"14:59:16"2013"*0400 """"Initialize"repo,"add"README. > Where’ve We Been? > 41 Wednesday, May 22, 13

Slide 164

Slide 164 text

First Change > 42 Wednesday, May 22, 13

Slide 165

Slide 165 text

First Change >"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > > 42 Wednesday, May 22, 13

Slide 166

Slide 166 text

First Change >"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > > 42 Wednesday, May 22, 13

Slide 167

Slide 167 text

First Change >"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > > 42 Wednesday, May 22, 13

Slide 168

Slide 168 text

First Change >"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > > ""emacs"deploy/appschema.sql > 42 Wednesday, May 22, 13

Slide 169

Slide 169 text

deploy/appschem deploy/appschema.sql **"Deploy"appschema BEGIN; COMMIT; **"XXX"Add"DDLs"here. 43 Wednesday, May 22, 13

Slide 170

Slide 170 text

deploy/appschem deploy/appschema.sql **"Deploy"appschema BEGIN; COMMIT; CREATE"SCHEMA"flipr; 43 Wednesday, May 22, 13

Slide 171

Slide 171 text

>"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > First Change > ""emacs"deploy/appschema.sql > 44 Wednesday, May 22, 13

Slide 172

Slide 172 text

>"sqitch"add"appschema"*n"'Adds"flipr"app"schema.' Created"deploy/appschema.sql Created"revert/appschema.sql Created"verify/appschema.sql Added""appschema""to"sqitch.plan > First Change > ""emacs"deploy/appschema.sql > ""emacs"revert/appschema.sql > 44 Wednesday, May 22, 13

Slide 173

Slide 173 text

revert/appschem revert/appschema.sql **"Revert"appschema BEGIN; COMMIT; **"XXX"Add"DDLs"here. 45 Wednesday, May 22, 13

Slide 174

Slide 174 text

revert/appschem revert/appschema.sql **"Revert"appschema BEGIN; COMMIT; DROP"SCHEMA"flipr; 45 Wednesday, May 22, 13

Slide 175

Slide 175 text

Make it So! > 46 Wednesday, May 22, 13

Slide 176

Slide 176 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > 46 Wednesday, May 22, 13

Slide 177

Slide 177 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > Might need -U postgres 46 Wednesday, May 22, 13

Slide 178

Slide 178 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > 46 Wednesday, May 22, 13

Slide 179

Slide 179 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > 46 Wednesday, May 22, 13

Slide 180

Slide 180 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > 46 Wednesday, May 22, 13

Slide 181

Slide 181 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > 46 Wednesday, May 22, 13

Slide 182

Slide 182 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > ""psql"*d"flipr_test"*c"'\dn"flipr' List"of"schemas "Name""|"Owner" *******+******* "flipr"|"david > 46 Wednesday, May 22, 13

Slide 183

Slide 183 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > ""psql"*d"flipr_test"*c"'\dn"flipr' List"of"schemas "Name""|"Owner" *******+******* "flipr"|"david > Trust, but verify 46 Wednesday, May 22, 13

Slide 184

Slide 184 text

""createdb"flipr_test >"sqitch"**db*name"flipr_test"deploy Adding"metadata"tables"to"flipr_test Deploying"to"flipr_test ""+"appschema".."ok > Make it So! > ""psql"*d"flipr_test"*c"'\dn"flipr' List"of"schemas "Name""|"Owner" *******+******* "flipr"|"david > ""emacs"verify/appschema.sql 46 Wednesday, May 22, 13

Slide 185

Slide 185 text

**"Verify"appschema BEGIN; ROLLBACK; verify/appschem verify/appschema.sql **"XXX"Add"verifications"here. 47 Wednesday, May 22, 13

Slide 186

Slide 186 text

**"Verify"appschema BEGIN; ROLLBACK; SELECT"pg_catalog.has_schema_privilege('nada',"'usage'); verify/appschem verify/appschema.sql 47 Wednesday, May 22, 13

Slide 187

Slide 187 text

**"Verify"appschema BEGIN; ROLLBACK; SELECT"pg_catalog.has_schema_privilege('nada',"'usage'); verify/appschem verify/appschema.sql Let’s try it, first 47 Wednesday, May 22, 13

Slide 188

Slide 188 text

Trust, But Verify > ""emacs"verify/appschema.sql > 48 Wednesday, May 22, 13

Slide 189

Slide 189 text

Trust, But Verify > ""emacs"verify/appschema.sql > ""sqitch"**db*name"flipr_test"verify Verifying"flipr_test ""*"appschema".."psql:verify/appschema.sql:5:" ERROR:""schema""nada""does"not"exist #"Verify"script""verify/appschema.sql""failed. not"ok Verify"Summary"Report ********************* Changes:"1 Errors:""1 Verify"failed > 48 Wednesday, May 22, 13

Slide 190

Slide 190 text

Trust, But Verify > ""emacs"verify/appschema.sql > ""sqitch"**db*name"flipr_test"verify Verifying"flipr_test ""*"appschema".."psql:verify/appschema.sql:5:" ERROR:""schema""nada""does"not"exist #"Verify"script""verify/appschema.sql""failed. not"ok Verify"Summary"Report ********************* Changes:"1 Errors:""1 Verify"failed > 48 Wednesday, May 22, 13

Slide 191

Slide 191 text

Trust, But Verify > ""emacs"verify/appschema.sql > ""sqitch"**db*name"flipr_test"verify Verifying"flipr_test ""*"appschema".."psql:verify/appschema.sql:5:" ERROR:""schema""nada""does"not"exist #"Verify"script""verify/appschema.sql""failed. not"ok Verify"Summary"Report ********************* Changes:"1 Errors:""1 Verify"failed > 48 Wednesday, May 22, 13

Slide 192

Slide 192 text

Trust, But Verify > ""emacs"verify/appschema.sql > ""sqitch"**db*name"flipr_test"verify Verifying"flipr_test ""*"appschema".."psql:verify/appschema.sql:5:" ERROR:""schema""nada""does"not"exist #"Verify"script""verify/appschema.sql""failed. not"ok Verify"Summary"Report ********************* Changes:"1 Errors:""1 Verify"failed > 48 Wednesday, May 22, 13

Slide 193

Slide 193 text

Trust, But Verify > 49 Wednesday, May 22, 13

Slide 194

Slide 194 text

""perl"*i"*pe"'s/nada/flipr/'"verify/appschema.sql >" Trust, But Verify > 49 Wednesday, May 22, 13

Slide 195

Slide 195 text

""sqitch"**db*name"flipr_test"verify Verifying"flipr_test ""*"appschema".."ok Verify"successful > ""perl"*i"*pe"'s/nada/flipr/'"verify/appschema.sql >" Trust, But Verify > Mo betta. 49 Wednesday, May 22, 13

Slide 196

Slide 196 text

> How’s it Look? 50 Wednesday, May 22, 13

Slide 197

Slide 197 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 198

Slide 198 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 199

Slide 199 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 200

Slide 200 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 201

Slide 201 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 202

Slide 202 text

> How’s it Look? >"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:04:08"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > 50 Wednesday, May 22, 13

Slide 203

Slide 203 text

Go Back > 51 Wednesday, May 22, 13

Slide 204

Slide 204 text

>"sqitch"**db*name"flipr_test"revert ""Revert"all"changes"from"flipr_test?"[Yes] Go Back >  51 Wednesday, May 22, 13

Slide 205

Slide 205 text

>"sqitch"**db*name"flipr_test"revert ""Revert"all"changes"from"flipr_test?"[Yes] Go Back >  51 Wednesday, May 22, 13

Slide 206

Slide 206 text

>"sqitch"**db*name"flipr_test"revert ""Revert"all"changes"from"flipr_test?"[Yes] Go Back > ""*"appschema".."ok > 51 Wednesday, May 22, 13

Slide 207

Slide 207 text

>"sqitch"**db*name"flipr_test"revert ""Revert"all"changes"from"flipr_test?"[Yes] Go Back > ""psql"*d"flipr_test"*c"'\dn"flipr' """"""""""""List"of"roles List"of"schemas "Name"|"Owner" ******+******* > ""*"appschema".."ok > 51 Wednesday, May 22, 13

Slide 208

Slide 208 text

>"sqitch"**db*name"flipr_test"revert ""Revert"all"changes"from"flipr_test?"[Yes] Go Back > ""psql"*d"flipr_test"*c"'\dn"flipr' """"""""""""List"of"roles List"of"schemas "Name"|"Owner" ******+******* > ""*"appschema".."ok > ""sqitch"*d"flipr_test"status #"On"database"flipr_test No"changes"deployed > 51 Wednesday, May 22, 13

Slide 209

Slide 209 text

History > 52 Wednesday, May 22, 13

Slide 210

Slide 210 text

History > >"sqitch"*d"flipr_test"log On"database"flipr_test Revert"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:07:07"*0400 """"Adds"flipr"app"schema. Deploy"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:04:08"*0400 """"Adds"flipr"app"schema. 52 Wednesday, May 22, 13

Slide 211

Slide 211 text

History > >"sqitch"*d"flipr_test"log On"database"flipr_test Revert"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:07:07"*0400 """"Adds"flipr"app"schema. Deploy"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:04:08"*0400 """"Adds"flipr"app"schema. 52 Wednesday, May 22, 13

Slide 212

Slide 212 text

History > >"sqitch"*d"flipr_test"log On"database"flipr_test Revert"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:07:07"*0400 """"Adds"flipr"app"schema. Deploy"748346dfe73cf2af32a8b7088fd75ad8d7aecda3 Name:""""""appschema Committer:"David"E."Wheeler" Date:""""""2013*05*21"15:04:08"*0400 """"Adds"flipr"app"schema. 52 Wednesday, May 22, 13

Slide 213

Slide 213 text

Commit It! > 53 Wednesday, May 22, 13

Slide 214

Slide 214 text

Commit It! > ""git"add". >"git"commit"*m"'Add"flipr"schema.' [master"dc23038]"Add"flipr"schema. "4"files"changed,"22"insertions(+) "create"mode"100644"deploy/appschema.sql "create"mode"100644"revert/appschema.sql "create"mode"100644"verify/appschema.sql > 53 Wednesday, May 22, 13

Slide 215

Slide 215 text

Commit It! > ""git"add". >"git"commit"*m"'Add"flipr"schema.' [master"dc23038]"Add"flipr"schema. "4"files"changed,"22"insertions(+) "create"mode"100644"deploy/appschema.sql "create"mode"100644"revert/appschema.sql "create"mode"100644"verify/appschema.sql > 53 Wednesday, May 22, 13

Slide 216

Slide 216 text

Commit It! > ""git"add". >"git"commit"*m"'Add"flipr"schema.' [master"dc23038]"Add"flipr"schema. "4"files"changed,"22"insertions(+) "create"mode"100644"deploy/appschema.sql "create"mode"100644"revert/appschema.sql "create"mode"100644"verify/appschema.sql > 53 Wednesday, May 22, 13

Slide 217

Slide 217 text

Commit It! > ""git"add". >"git"commit"*m"'Add"flipr"schema.' [master"dc23038]"Add"flipr"schema. "4"files"changed,"22"insertions(+) "create"mode"100644"deploy/appschema.sql "create"mode"100644"revert/appschema.sql "create"mode"100644"verify/appschema.sql > ""git"push Counting"objects:"11,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(6/6),"done. Writing"objects:"100%"(9/9),"943"bytes,"done. Total"9"(delta"0),"reused"0"(delta"0) To"../flipr*remote """a4f765f..dc23038""master"*>"master 53 Wednesday, May 22, 13

Slide 218

Slide 218 text

Commit It! > ""git"add". >"git"commit"*m"'Add"flipr"schema.' [master"dc23038]"Add"flipr"schema. "4"files"changed,"22"insertions(+) "create"mode"100644"deploy/appschema.sql "create"mode"100644"revert/appschema.sql "create"mode"100644"verify/appschema.sql > ""git"push Counting"objects:"11,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(6/6),"done. Writing"objects:"100%"(9/9),"943"bytes,"done. Total"9"(delta"0),"reused"0"(delta"0) To"../flipr*remote """a4f765f..dc23038""master"*>"master 53 Wednesday, May 22, 13

Slide 219

Slide 219 text

Redeploy > 54 Wednesday, May 22, 13

Slide 220

Slide 220 text

>"sqitch"**db*name"flipr_test"deploy"**verify Deploying"changes"to"flipr_test ""+"appschema".."ok > Redeploy > 54 Wednesday, May 22, 13

Slide 221

Slide 221 text

>"sqitch"**db*name"flipr_test"deploy"**verify Deploying"changes"to"flipr_test ""+"appschema".."ok > Redeploy > Integrated! 54 Wednesday, May 22, 13

Slide 222

Slide 222 text

>"sqitch"**db*name"flipr_test"deploy"**verify Deploying"changes"to"flipr_test ""+"appschema".."ok > Redeploy > 54 Wednesday, May 22, 13

Slide 223

Slide 223 text

>"sqitch"**db*name"flipr_test"deploy"**verify Deploying"changes"to"flipr_test ""+"appschema".."ok > Redeploy > ""psql"*d"flipr_test"*c"'\dn"flipr' List"of"schemas "Name""|"Owner" *******+******* "flipr"|"david > 54 Wednesday, May 22, 13

Slide 224

Slide 224 text

Status Update > 55 Wednesday, May 22, 13

Slide 225

Slide 225 text

>"sqitch"*d"flipr_test"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:10:02"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > Status Update > 55 Wednesday, May 22, 13

Slide 226

Slide 226 text

Save My Fingers > 56 Wednesday, May 22, 13

Slide 227

Slide 227 text

Save My Fingers > ""sqitch"config"core.pg.db_name"flipr_test > 56 Wednesday, May 22, 13

Slide 228

Slide 228 text

Save My Fingers > ""sqitch"config"core.pg.db_name"flipr_test > ""sqitch"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:10:02"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > No --db-name 56 Wednesday, May 22, 13

Slide 229

Slide 229 text

Save My Fingers > ""sqitch"config"core.pg.db_name"flipr_test > ""sqitch"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:10:02"*0400 #"By:"""""""David"E."Wheeler" #" Nothing"to"deploy"(up*to*date) > No --db-name >"sqitch"config"**bool"deploy.verify"true >"sqitch"config"**bool"rebase.verify"true > Always verify. 56 Wednesday, May 22, 13

Slide 230

Slide 230 text

Commit Config > 57 Wednesday, May 22, 13

Slide 231

Slide 231 text

Commit Config > ""git"add". >"git"commit"*m"'Add"db_name"and"verify"to"config.' [master"795697f]"Add"db_name"and"verify"to"config. "1"file"changed,"6"insertions(+) > 57 Wednesday, May 22, 13

Slide 232

Slide 232 text

Commit Config > ""git"add". >"git"commit"*m"'Add"db_name"and"verify"to"config.' [master"795697f]"Add"db_name"and"verify"to"config. "1"file"changed,"6"insertions(+) > 57 Wednesday, May 22, 13

Slide 233

Slide 233 text

Commit Config > ""git"push Counting"objects:"5,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(3/3),"done. Writing"objects:"100%"(3/3),"376"bytes,"done. Total"3"(delta"2),"reused"0"(delta"0) To"../flipr*remote """dc23038..795697f""master"*>"master > ""git"add". >"git"commit"*m"'Add"db_name"and"verify"to"config.' [master"795697f]"Add"db_name"and"verify"to"config. "1"file"changed,"6"insertions(+) > 57 Wednesday, May 22, 13

Slide 234

Slide 234 text

Not Migrations? antisocial network 58 Wednesday, May 22, 13

Slide 235

Slide 235 text

Not Migrations? Incomplete mini-language antisocial network 58 Wednesday, May 22, 13

Slide 236

Slide 236 text

Not Migrations? Incomplete mini-language No logical replication integration antisocial network 58 Wednesday, May 22, 13

Slide 237

Slide 237 text

Not Migrations? Incomplete mini-language No logical replication integration Numbered scripts difficult to track antisocial network 58 Wednesday, May 22, 13

Slide 238

Slide 238 text

Not Migrations? Incomplete mini-language No logical replication integration Numbered scripts difficult to track No VCS awareness antisocial network 58 Wednesday, May 22, 13

Slide 239

Slide 239 text

SQL Migrations? Incomplete mini-language No logical replication integration Numbered scripts hard to track No VCS awareness antisocial network 59 Wednesday, May 22, 13

Slide 240

Slide 240 text

SQL Migrations? Incomplete mini-language No logical replication integration Numbered scripts hard to track No VCS awareness ——————————————— antisocial network 59 Wednesday, May 22, 13

Slide 241

Slide 241 text

SQL Migrations? Incomplete mini-language No logical replication integration Numbered scripts hard to track No VCS awareness ——————————————— ——————————————————— antisocial network 59 Wednesday, May 22, 13

Slide 242

Slide 242 text

SQL Migrations? Incomplete mini-language No logical replication integration Numbered scripts hard to track No VCS awareness ——————————————— ——————————————————— Managing procedures is a PITA antisocial network 59 Wednesday, May 22, 13

Slide 243

Slide 243 text

Sq—what? sql anges ch antisocial network 60 Wednesday, May 22, 13

Slide 244

Slide 244 text

Sq—what? sq ch antisocial network 60 Wednesday, May 22, 13

Slide 245

Slide 245 text

it Sq—what? sq ch antisocial network 60 Wednesday, May 22, 13

Slide 246

Slide 246 text

it Sq—what? sq ch There is no “u” antisocial network 60 Wednesday, May 22, 13

Slide 247

Slide 247 text

Sqitch Philosophy antisocial network 61 Wednesday, May 22, 13

Slide 248

Slide 248 text

Sqitch Philosophy No opinions antisocial network 61 Wednesday, May 22, 13

Slide 249

Slide 249 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) antisocial network 61 Wednesday, May 22, 13

Slide 250

Slide 250 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) Cross-project dependency resolution antisocial network 61 Wednesday, May 22, 13

Slide 251

Slide 251 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) Cross-project dependency resolution Distribution bundling antisocial network 61 Wednesday, May 22, 13

Slide 252

Slide 252 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) Cross-project dependency resolution Distribution bundling Integrated verification testing antisocial network 61 Wednesday, May 22, 13

Slide 253

Slide 253 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) Cross-project dependency resolution Distribution bundling Integrated verification testing No numbering antisocial network 61 Wednesday, May 22, 13

Slide 254

Slide 254 text

Sqitch Philosophy No opinions Native scripting (psql, sqlite3, SQL*Plus) Cross-project dependency resolution Distribution bundling Integrated verification testing No numbering Reliable sequential deployment ordering antisocial network 61 Wednesday, May 22, 13

Slide 255

Slide 255 text

SHAzbat antisocial network 62 Wednesday, May 22, 13

Slide 256

Slide 256 text

SHAzbat SHA1 ID for every object antisocial network 62 Wednesday, May 22, 13

Slide 257

Slide 257 text

SHAzbat SHA1 ID for every object Stolen from Git antisocial network 62 Wednesday, May 22, 13

Slide 258

Slide 258 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify antisocial network 62 Wednesday, May 22, 13

Slide 259

Slide 259 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify Hashed change text includes: antisocial network 62 Wednesday, May 22, 13

Slide 260

Slide 260 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify Hashed change text includes: Project antisocial network 62 Wednesday, May 22, 13

Slide 261

Slide 261 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify Hashed change text includes: Project Name antisocial network 62 Wednesday, May 22, 13

Slide 262

Slide 262 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify Hashed change text includes: Project Name Parent ID antisocial network 62 Wednesday, May 22, 13

Slide 263

Slide 263 text

SHAzbat SHA1 ID for every object Stolen from Git change, tag, deploy, revert, verify Hashed change text includes: Project Name Parent ID Planner… antisocial network 62 Wednesday, May 22, 13

Slide 264

Slide 264 text

SHAsome > 63 Wednesday, May 22, 13

Slide 265

Slide 265 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 266

Slide 266 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > Symbolic Sqitch tag 63 Wednesday, May 22, 13

Slide 267

Slide 267 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 268

Slide 268 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 269

Slide 269 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 270

Slide 270 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 271

Slide 271 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 272

Slide 272 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 273

Slide 273 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 274

Slide 274 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 275

Slide 275 text

SHAsome > ""sqitch"show"change"@HEAD project"pgxn_manager uri"https://github.com/pgxn/pgxn*manager.git change"distview parent"39d7e105cb00e1798cfabb45f4b74cbc14a82513 planner"David"E."Wheeler" date"2013*02*08T23:51:19Z requires ""+"roles ""+"pgxn_core:types ""+"distributions ""+"extensions Adds"the"filters"table. > 63 Wednesday, May 22, 13

Slide 276

Slide 276 text

SHApay! antisocial network 64 Wednesday, May 22, 13

Slide 277

Slide 277 text

SHApay! Each change (except first) includes parent antisocial network 64 Wednesday, May 22, 13

Slide 278

Slide 278 text

SHApay! Each change (except first) includes parent Can trace from any change to the beginning antisocial network 64 Wednesday, May 22, 13

Slide 279

Slide 279 text

SHApay! Each change (except first) includes parent Can trace from any change to the beginning Change tampering (corruption) detectable antisocial network 64 Wednesday, May 22, 13

Slide 280

Slide 280 text

SHApay! Each change (except first) includes parent Can trace from any change to the beginning Change tampering (corruption) detectable Because the hash will be wrong antisocial network 64 Wednesday, May 22, 13

Slide 281

Slide 281 text

SHApay! Each change (except first) includes parent Can trace from any change to the beginning Change tampering (corruption) detectable Because the hash will be wrong Stole Linus Torvalds’s “greatest invention” antisocial network 64 Wednesday, May 22, 13

Slide 282

Slide 282 text

Sqitch Features antisocial network 65 Wednesday, May 22, 13

Slide 283

Slide 283 text

Sqitch Features Reduced duplication antisocial network 65 Wednesday, May 22, 13

Slide 284

Slide 284 text

Sqitch Features Reduced duplication Built-in configuration antisocial network 65 Wednesday, May 22, 13

Slide 285

Slide 285 text

Sqitch Features Reduced duplication Built-in configuration Iterative development antisocial network 65 Wednesday, May 22, 13

Slide 286

Slide 286 text

Sqitch Features Reduced duplication Built-in configuration Iterative development Deployment planning antisocial network 65 Wednesday, May 22, 13

Slide 287

Slide 287 text

Sqitch Features Reduced duplication Built-in configuration Iterative development Deployment planning Git-style interface antisocial network 65 Wednesday, May 22, 13

Slide 288

Slide 288 text

Sqitch Features Reduced duplication Built-in configuration Iterative development Deployment planning Git-style interface Deployment tagging antisocial network 65 Wednesday, May 22, 13

Slide 289

Slide 289 text

antisocial network Your Turn 66 Wednesday, May 22, 13

Slide 290

Slide 290 text

antisocial network Your Turn Configure Sqitch 66 Wednesday, May 22, 13

Slide 291

Slide 291 text

antisocial network Your Turn Configure Sqitch Initialize project 66 Wednesday, May 22, 13

Slide 292

Slide 292 text

antisocial network Your Turn Configure Sqitch Initialize project Add appschema change 66 Wednesday, May 22, 13

Slide 293

Slide 293 text

antisocial network Your Turn Configure Sqitch Initialize project Add appschema change Deploy/Revert 66 Wednesday, May 22, 13

Slide 294

Slide 294 text

antisocial network Your Turn Configure Sqitch Initialize project Add appschema change Deploy/Revert Commit/push 66 Wednesday, May 22, 13

Slide 295

Slide 295 text

antisocial network Your Turn Configure Sqitch Initialize project Add appschema change Deploy/Revert Commit/push https:/ /github.com/ theory/agile-flipr.git 66 Wednesday, May 22, 13

Slide 296

Slide 296 text

Add Tests > 67 Wednesday, May 22, 13

Slide 297

Slide 297 text

Add Tests > ""mkdir"test > 67 Wednesday, May 22, 13

Slide 298

Slide 298 text

Add Tests > ""mkdir"test > ""emacs"test/appschema.sql > 67 Wednesday, May 22, 13

Slide 299

Slide 299 text

test/appschema. pgTAP Basics 68 Wednesday, May 22, 13

Slide 300

Slide 300 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 301

Slide 301 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 302

Slide 302 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 303

Slide 303 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 304

Slide 304 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 305

Slide 305 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 306

Slide 306 text

test/appschema. pgTAP Basics SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; **"Plan"the"tests. SELECT"plan(1); SELECT"has_schema('nada'); **"Clean"up. SELECT"finish(); ROLLBACK; 68 Wednesday, May 22, 13

Slide 307

Slide 307 text

> Run the Test 69 Wednesday, May 22, 13

Slide 308

Slide 308 text

> Run the Test ""pg_prove"*v"*d"flipr_test"test/appschema.sql test/appschema.sql".." 1..1 not"ok"1"*"Schema"nada"should"exist #"Failed"test"1:""Schema"nada"should"exist" #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/appschema.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL 69 Wednesday, May 22, 13

Slide 309

Slide 309 text

> Run the Test ""pg_prove"*v"*d"flipr_test"test/appschema.sql test/appschema.sql".." 1..1 not"ok"1"*"Schema"nada"should"exist #"Failed"test"1:""Schema"nada"should"exist" #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/appschema.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL 69 Wednesday, May 22, 13

Slide 310

Slide 310 text

> Run the Test ""pg_prove"*v"*d"flipr_test"test/appschema.sql test/appschema.sql".." 1..1 not"ok"1"*"Schema"nada"should"exist #"Failed"test"1:""Schema"nada"should"exist" #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/appschema.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL 69 Wednesday, May 22, 13

Slide 311

Slide 311 text

First Pass > 70 Wednesday, May 22, 13

Slide 312

Slide 312 text

""perl"*i"*pe"'s/nada/flipr/'"test/appschema.sql > First Pass > 70 Wednesday, May 22, 13

Slide 313

Slide 313 text

""perl"*i"*pe"'s/nada/flipr/'"test/appschema.sql > First Pass > >"pg_prove"*v"*d"flipr_test"test/appschema.sql"""" " test/appschema.sql".." 1..1 ok"1"*"Schema"flipr"should"exist ok All"tests"successful. Files=1,"Tests=1,""0"wallclock"secs Result:"PASS 70 Wednesday, May 22, 13

Slide 314

Slide 314 text

""perl"*i"*pe"'s/nada/flipr/'"test/appschema.sql > First Pass W00t! > >"pg_prove"*v"*d"flipr_test"test/appschema.sql"""" " test/appschema.sql".." 1..1 ok"1"*"Schema"flipr"should"exist ok All"tests"successful. Files=1,"Tests=1,""0"wallclock"secs Result:"PASS 70 Wednesday, May 22, 13

Slide 315

Slide 315 text

Pass it On > 71 Wednesday, May 22, 13

Slide 316

Slide 316 text

""git"add". > Pass it On > 71 Wednesday, May 22, 13

Slide 317

Slide 317 text

""git"add". > ""git"commit"*m"'Add"appschema"test.' [master"e46bdf9]"Add"appschema"test. "1"file"changed,"14"insertions(+) "create"mode"100644"test/appschema.sql > Pass it On > 71 Wednesday, May 22, 13

Slide 318

Slide 318 text

""git"add". > ""git"commit"*m"'Add"appschema"test.' [master"e46bdf9]"Add"appschema"test. "1"file"changed,"14"insertions(+) "create"mode"100644"test/appschema.sql > Pass it On > ""git"push Counting"objects:"5,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(3/3),"done. Writing"objects:"100%"(4/4),"487"bytes,"done. Total"4"(delta"1),"reused"0"(delta"0) To"../flipr*remote """795697f..e46bdf9""master"*>"master > 71 Wednesday, May 22, 13

Slide 319

Slide 319 text

OMG TAP WTF? The Test Anything Protocol (TAP) is a protocol to allow communication between unit tests and a test harness. It allows individual tests (TAP producers) to communicate test results to the testing harness in a language-agnostic way. —Wikipedia 72 Wednesday, May 22, 13

Slide 320

Slide 320 text

What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 321

Slide 321 text

What does that mean in practice? What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 322

Slide 322 text

What does that mean in practice? Test output easy to interpret What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 323

Slide 323 text

What does that mean in practice? Test output easy to interpret By humans What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 324

Slide 324 text

What does that mean in practice? Test output easy to interpret By humans By computers What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 325

Slide 325 text

What does that mean in practice? Test output easy to interpret By humans By computers pg_prove (the harness) What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 326

Slide 326 text

What does that mean in practice? Test output easy to interpret By humans By computers pg_prove (the harness) By aliens What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 327

Slide 327 text

What does that mean in practice? Test output easy to interpret By humans By computers pg_prove (the harness) By aliens By gum! What is TAP? antisocial network 73 Wednesday, May 22, 13

Slide 328

Slide 328 text

What’s the plan, man? antisocial network 74 Wednesday, May 22, 13

Slide 329

Slide 329 text

What’s the plan, man? Includes Test controls: antisocial network 74 Wednesday, May 22, 13

Slide 330

Slide 330 text

What’s the plan, man? Includes Test controls: plan() — How many tests? antisocial network 74 Wednesday, May 22, 13

Slide 331

Slide 331 text

What’s the plan, man? Includes Test controls: plan() — How many tests? no_plan() — Unknown number of tests antisocial network 74 Wednesday, May 22, 13

Slide 332

Slide 332 text

What’s the plan, man? Includes Test controls: plan() — How many tests? no_plan() — Unknown number of tests diag() — Diagnostic output antisocial network 74 Wednesday, May 22, 13

Slide 333

Slide 333 text

What’s the plan, man? Includes Test controls: plan() — How many tests? no_plan() — Unknown number of tests diag() — Diagnostic output finish() — Test finished, report! antisocial network 74 Wednesday, May 22, 13

Slide 334

Slide 334 text

Scalarly antisocial network 75 Wednesday, May 22, 13

Slide 335

Slide 335 text

Scalarly Includes simple scalar test functions: antisocial network 75 Wednesday, May 22, 13

Slide 336

Slide 336 text

Scalarly Includes simple scalar test functions: ok() — Boolean antisocial network 75 Wednesday, May 22, 13

Slide 337

Slide 337 text

Scalarly Includes simple scalar test functions: ok() — Boolean is() — Value comparison antisocial network 75 Wednesday, May 22, 13

Slide 338

Slide 338 text

Scalarly Includes simple scalar test functions: ok() — Boolean is() — Value comparison isnt() — NOT is() antisocial network 75 Wednesday, May 22, 13

Slide 339

Slide 339 text

Scalarly Includes simple scalar test functions: ok() — Boolean is() — Value comparison isnt() — NOT is() cmp_ok() — Compare with specific operator antisocial network 75 Wednesday, May 22, 13

Slide 340

Slide 340 text

Scalarly Includes simple scalar test functions: ok() — Boolean is() — Value comparison isnt() — NOT is() cmp_ok() — Compare with specific operator matches() — Regex comparison antisocial network 75 Wednesday, May 22, 13

Slide 341

Slide 341 text

Scalarly Includes simple scalar test functions: ok() — Boolean is() — Value comparison isnt() — NOT is() cmp_ok() — Compare with specific operator matches() — Regex comparison imatches() — Case-insensitive regex comparison antisocial network 75 Wednesday, May 22, 13

Slide 342

Slide 342 text

It’s All Relative antisocial network 76 Wednesday, May 22, 13

Slide 343

Slide 343 text

It’s All Relative Includes functions for testing relations: antisocial network 76 Wednesday, May 22, 13

Slide 344

Slide 344 text

It’s All Relative Includes functions for testing relations: results_eq() — Ordered results antisocial network 76 Wednesday, May 22, 13

Slide 345

Slide 345 text

It’s All Relative Includes functions for testing relations: results_eq() — Ordered results set_eq() — Set of values antisocial network 76 Wednesday, May 22, 13

Slide 346

Slide 346 text

It’s All Relative Includes functions for testing relations: results_eq() — Ordered results set_eq() — Set of values bag_eq() — Bag of values antisocial network 76 Wednesday, May 22, 13

Slide 347

Slide 347 text

It’s All Relative Includes functions for testing relations: results_eq() — Ordered results set_eq() — Set of values bag_eq() — Bag of values row_eq() — Single row antisocial network 76 Wednesday, May 22, 13

Slide 348

Slide 348 text

It’s All Relative Includes functions for testing relations: results_eq() — Ordered results set_eq() — Set of values bag_eq() — Bag of values row_eq() — Single row is_empty() — No results antisocial network 76 Wednesday, May 22, 13

Slide 349

Slide 349 text

I’m Okay, You’re Okay antisocial network 77 Wednesday, May 22, 13

Slide 350

Slide 350 text

I’m Okay, You’re Okay throws_ok() — Throws an exception antisocial network 77 Wednesday, May 22, 13

Slide 351

Slide 351 text

I’m Okay, You’re Okay throws_ok() — Throws an exception throws_like() — Exception matches regex antisocial network 77 Wednesday, May 22, 13

Slide 352

Slide 352 text

I’m Okay, You’re Okay throws_ok() — Throws an exception throws_like() — Exception matches regex skip() — Skip a subset of tests antisocial network 77 Wednesday, May 22, 13

Slide 353

Slide 353 text

I’m Okay, You’re Okay throws_ok() — Throws an exception throws_like() — Exception matches regex skip() — Skip a subset of tests todo() — Expect subset of tests to fail antisocial network 77 Wednesday, May 22, 13

Slide 354

Slide 354 text

Schematics antisocial network 78 Wednesday, May 22, 13

Slide 355

Slide 355 text

Schematics has_table(), has_view(), has_function(), etc. antisocial network 78 Wednesday, May 22, 13

Slide 356

Slide 356 text

Schematics has_table(), has_view(), has_function(), etc. columns_are(), has_pk(), fk_ok(), etc. antisocial network 78 Wednesday, May 22, 13

Slide 357

Slide 357 text

Schematics has_table(), has_view(), has_function(), etc. columns_are(), has_pk(), fk_ok(), etc. col_type_is(), col_not_null(), col_default_is() antisocial network 78 Wednesday, May 22, 13

Slide 358

Slide 358 text

Schematics has_table(), has_view(), has_function(), etc. columns_are(), has_pk(), fk_ok(), etc. col_type_is(), col_not_null(), col_default_is() So, so much more… antisocial network 78 Wednesday, May 22, 13

Slide 359

Slide 359 text

Other Features and Topics antisocial network 79 Wednesday, May 22, 13

Slide 360

Slide 360 text

Other Features and Topics xUnit-Style testing antisocial network 79 Wednesday, May 22, 13

Slide 361

Slide 361 text

Other Features and Topics xUnit-Style testing Test-Driven development antisocial network 79 Wednesday, May 22, 13

Slide 362

Slide 362 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests antisocial network 79 Wednesday, May 22, 13

Slide 363

Slide 363 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress antisocial network 79 Wednesday, May 22, 13

Slide 364

Slide 364 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress Negative assertions antisocial network 79 Wednesday, May 22, 13

Slide 365

Slide 365 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress Negative assertions Roles and privileges assertions antisocial network 79 Wednesday, May 22, 13

Slide 366

Slide 366 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress Negative assertions Roles and privileges assertions http:/ /pgtap.org/ antisocial network 79 Wednesday, May 22, 13

Slide 367

Slide 367 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress Negative assertions Roles and privileges assertions http:/ /pgtap.org/ http:/ /pgxn.org/extension/pgtap/ antisocial network 79 Wednesday, May 22, 13

Slide 368

Slide 368 text

Other Features and Topics xUnit-Style testing Test-Driven development Integration with Perl unit tests Integration with pg_regress Negative assertions Roles and privileges assertions http:/ /pgtap.org/ http:/ /pgxn.org/extension/pgtap/ antisocial network 79 Wednesday, May 22, 13

Slide 369

Slide 369 text

antisocial network Let’s do it! 80 Wednesday, May 22, 13

Slide 370

Slide 370 text

antisocial network Let’s do it! Create appschema test 80 Wednesday, May 22, 13

Slide 371

Slide 371 text

antisocial network Let’s do it! Create appschema test Use pgTAP 80 Wednesday, May 22, 13

Slide 372

Slide 372 text

antisocial network Let’s do it! Create appschema test Use pgTAP Run test with pg_prove 80 Wednesday, May 22, 13

Slide 373

Slide 373 text

antisocial network Let’s do it! Create appschema test Use pgTAP Run test with pg_prove Make it fail 80 Wednesday, May 22, 13

Slide 374

Slide 374 text

antisocial network Let’s do it! Create appschema test Use pgTAP Run test with pg_prove Make it fail Make it pass! 80 Wednesday, May 22, 13

Slide 375

Slide 375 text

antisocial network Let’s do it! Create appschema test Use pgTAP Run test with pg_prove Make it fail Make it pass! Commit/Push 80 Wednesday, May 22, 13

Slide 376

Slide 376 text

antisocial network Let’s do it! Create appschema test Use pgTAP Run test with pg_prove Make it fail Make it pass! Commit/Push https:/ /github.com/ theory/agile-flipr.git 80 Wednesday, May 22, 13

Slide 377

Slide 377 text

Let’s talk about… antisocial network antisocial network antisocial network 81 Wednesday, May 22, 13

Slide 378

Slide 378 text

antisocial network antisocial network 82 Wednesday, May 22, 13

Slide 379

Slide 379 text

TDD antisocial network antisocial network 82 Wednesday, May 22, 13

Slide 380

Slide 380 text

83 Wednesday, May 22, 13

Slide 381

Slide 381 text

“The act of writing a unit test is more an act of design than of verification. It is also more an act of documentation than of verification. The act of writing a unit test closes a remarkable number of feedback loops, the least of which is the one per– taining to the verification of function.” —Robert C. Martin 83 Wednesday, May 22, 13

Slide 382

Slide 382 text

antisocial network 84 Wednesday, May 22, 13

Slide 383

Slide 383 text

TDD is an act of design. antisocial network 84 Wednesday, May 22, 13

Slide 384

Slide 384 text

antisocial network 85 Wednesday, May 22, 13

Slide 385

Slide 385 text

TDD is an act of documentation. antisocial network 85 Wednesday, May 22, 13

Slide 386

Slide 386 text

antisocial network 86 Wednesday, May 22, 13

Slide 387

Slide 387 text

Okay. antisocial network 86 Wednesday, May 22, 13

Slide 388

Slide 388 text

antisocial network 87 Wednesday, May 22, 13

Slide 389

Slide 389 text

But… antisocial network 87 Wednesday, May 22, 13

Slide 390

Slide 390 text

Database Design antisocial network 88 Wednesday, May 22, 13

Slide 391

Slide 391 text

Database Design Specify requirements antisocial network 88 Wednesday, May 22, 13

Slide 392

Slide 392 text

Database Design Specify requirements Implement schema design antisocial network 88 Wednesday, May 22, 13

Slide 393

Slide 393 text

Database Design Specify requirements Implement schema design Program applications antisocial network 88 Wednesday, May 22, 13

Slide 394

Slide 394 text

Database Design Specify requirements Implement schema design Program applications QA antisocial network 88 Wednesday, May 22, 13

Slide 395

Slide 395 text

Database Design Specify requirements Implement schema design Program applications QA Big jump! antisocial network 88 Wednesday, May 22, 13

Slide 396

Slide 396 text

Database Design Specify requirements Implement schema design Program applications QA Pricy to fix antisocial network 88 Wednesday, May 22, 13

Slide 397

Slide 397 text

Database Design Specify requirements Implement schema design Program applications QA Never mind bureaucracy of DBA department antisocial network 88 Wednesday, May 22, 13

Slide 398

Slide 398 text

Why TDDD antisocial network 89 Wednesday, May 22, 13

Slide 399

Slide 399 text

Why TDDD Ensure data quality antisocial network 89 Wednesday, May 22, 13

Slide 400

Slide 400 text

Why TDDD Ensure data quality Data is a core asset antisocial network 89 Wednesday, May 22, 13

Slide 401

Slide 401 text

Why TDDD Ensure data quality Data is a core asset Validate business rules antisocial network 89 Wednesday, May 22, 13

Slide 402

Slide 402 text

Why TDDD Ensure data quality Data is a core asset Validate business rules Stored procedures antisocial network 89 Wednesday, May 22, 13

Slide 403

Slide 403 text

Why TDDD Ensure data quality Data is a core asset Validate business rules Stored procedures Triggers antisocial network 89 Wednesday, May 22, 13

Slide 404

Slide 404 text

Why TDDD Ensure data quality Data is a core asset Validate business rules Stored procedures Triggers Views antisocial network 89 Wednesday, May 22, 13

Slide 405

Slide 405 text

Why TDDD antisocial network 90 Wednesday, May 22, 13

Slide 406

Slide 406 text

Why TDDD Identify defects early antisocial network 90 Wednesday, May 22, 13

Slide 407

Slide 407 text

Why TDDD Identify defects early …and often! antisocial network 90 Wednesday, May 22, 13

Slide 408

Slide 408 text

Why TDDD Identify defects early …and often! Create design iteratively antisocial network 90 Wednesday, May 22, 13

Slide 409

Slide 409 text

Why TDDD Identify defects early …and often! Create design iteratively Evolutionarily antisocial network 90 Wednesday, May 22, 13

Slide 410

Slide 410 text

Why TDDD Identify defects early …and often! Create design iteratively Evolutionarily Validate refactorings antisocial network 90 Wednesday, May 22, 13

Slide 411

Slide 411 text

Why TDDD Identify defects early …and often! Create design iteratively Evolutionarily Validate refactorings Make sure nothing breaks antisocial network 90 Wednesday, May 22, 13

Slide 412

Slide 412 text

Three Questions for Database Professionals from Scott Ambler antisocial network 91 Wednesday, May 22, 13

Slide 413

Slide 413 text

92 Wednesday, May 22, 13

Slide 414

Slide 414 text

“If you’re implementing code in the DB in the form of stored procedures, triggers... shouldn’t you test that code to the same level that you test your app code?” 92 Wednesday, May 22, 13

Slide 415

Slide 415 text

93 Wednesday, May 22, 13

Slide 416

Slide 416 text

“Think of all the data quality problems you’ve run into over the years. Wouldn't it have been nice if someone had originally tested and discovered those problems before you did?” 93 Wednesday, May 22, 13

Slide 417

Slide 417 text

94 Wednesday, May 22, 13

Slide 418

Slide 418 text

“Wouldn’t it be nice to have a test suite to run so that you could determine how (and if) the DB actually works?” 94 Wednesday, May 22, 13

Slide 419

Slide 419 text

antisocial network 95 Wednesday, May 22, 13

Slide 420

Slide 420 text

Okay. antisocial network 95 Wednesday, May 22, 13

Slide 421

Slide 421 text

antisocial network 96 Wednesday, May 22, 13

Slide 422

Slide 422 text

How? antisocial network 96 Wednesday, May 22, 13

Slide 423

Slide 423 text

TDD How antisocial network 97 Wednesday, May 22, 13

Slide 424

Slide 424 text

TDD How Ideally separate from app tests antisocial network 97 Wednesday, May 22, 13

Slide 425

Slide 425 text

TDD How Ideally separate from app tests May be many apps antisocial network 97 Wednesday, May 22, 13

Slide 426

Slide 426 text

TDD How Ideally separate from app tests May be many apps DB should present interface to all antisocial network 97 Wednesday, May 22, 13

Slide 427

Slide 427 text

TDD How Ideally separate from app tests May be many apps DB should present interface to all Apps may use different permissions antisocial network 97 Wednesday, May 22, 13

Slide 428

Slide 428 text

TDD How Ideally separate from app tests May be many apps DB should present interface to all Apps may use different permissions Ideally use DB test Framework antisocial network 97 Wednesday, May 22, 13

Slide 429

Slide 429 text

TDD How Ideally separate from app tests May be many apps DB should present interface to all Apps may use different permissions Ideally use DB test Framework Like…pgTAP! antisocial network 97 Wednesday, May 22, 13

Slide 430

Slide 430 text

Branching Out > 98 Wednesday, May 22, 13

Slide 431

Slide 431 text

""git"checkout"*b"users"master Switched"to"a"new"branch"'users' > Branching Out > 98 Wednesday, May 22, 13

Slide 432

Slide 432 text

""git"checkout"*b"users"master Switched"to"a"new"branch"'users' > Branching Out > Branched off from others 98 Wednesday, May 22, 13

Slide 433

Slide 433 text

""git"checkout"*b"users"master Switched"to"a"new"branch"'users' > Branching Out > >"emacs"test/users.sql > 98 Wednesday, May 22, 13

Slide 434

Slide 434 text

test/users.sql Table For One 99 Wednesday, May 22, 13

Slide 435

Slide 435 text

SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); SELECT"finish(); ROLLBACK; test/users.sql Table For One 99 Wednesday, May 22, 13

Slide 436

Slide 436 text

SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); SELECT"finish(); ROLLBACK; test/users.sql Table For One 99 Wednesday, May 22, 13

Slide 437

Slide 437 text

SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); SELECT"finish(); ROLLBACK; test/users.sql Table For One 99 Wednesday, May 22, 13

Slide 438

Slide 438 text

SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); SELECT"finish(); ROLLBACK; test/users.sql Table For One 99 Wednesday, May 22, 13

Slide 439

Slide 439 text

Run ’Em > 100 Wednesday, May 22, 13

Slide 440

Slide 440 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." not"ok"1"*"Table"users"should"exist #"Failed"test"1:""Table"users"should"exist" 1..1 #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL > Run ’Em > 100 Wednesday, May 22, 13

Slide 441

Slide 441 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." not"ok"1"*"Table"users"should"exist #"Failed"test"1:""Table"users"should"exist" 1..1 #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL > Run ’Em > 100 Wednesday, May 22, 13

Slide 442

Slide 442 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." not"ok"1"*"Table"users"should"exist #"Failed"test"1:""Table"users"should"exist" 1..1 #"Looks"like"you"failed"1"test"of"1 Failed"1/1"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"1"Failed:"1) ""Failed"test:""1 Files=1,"Tests=1,""0"wallclock"secs Result:"FAIL > Run ’Em As expected. > 100 Wednesday, May 22, 13

Slide 443

Slide 443 text

Sqitch Dependencies! > 101 Wednesday, May 22, 13

Slide 444

Slide 444 text

Sqitch Dependencies! > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan > 101 Wednesday, May 22, 13

Slide 445

Slide 445 text

Sqitch Dependencies! > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan > 101 Wednesday, May 22, 13

Slide 446

Slide 446 text

Sqitch Dependencies! > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan > ""emacs"deploy/users.sql > 101 Wednesday, May 22, 13

Slide 447

Slide 447 text

deploy/users.sq deploy/users.sql **"XXX"Add"DDLs"here. COMMIT; **"Deploy"users **"requires:"appschema BEGIN; 102 Wednesday, May 22, 13

Slide 448

Slide 448 text

deploy/users.sq deploy/users.sql **"XXX"Add"DDLs"here. COMMIT; **"Deploy"users **"requires:"appschema BEGIN; 102 Wednesday, May 22, 13

Slide 449

Slide 449 text

SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT ); deploy/users.sq deploy/users.sql COMMIT; **"Deploy"users **"requires:"appschema BEGIN; 102 Wednesday, May 22, 13

Slide 450

Slide 450 text

SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT ); deploy/users.sq deploy/users.sql COMMIT; **"Deploy"users **"requires:"appschema BEGIN; Bare Minimum 102 Wednesday, May 22, 13

Slide 451

Slide 451 text

Verily, Users > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan >"emacs"deploy/users.sql > 103 Wednesday, May 22, 13

Slide 452

Slide 452 text

Verily, Users > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan >"emacs"deploy/users.sql > ""emacs"verify/users.sql 103 Wednesday, May 22, 13

Slide 453

Slide 453 text

**"Verify"users BEGIN; verify/users.sq verify/users.sql **"XXX"Add"verifications"here. ROLLBACK; 104 Wednesday, May 22, 13

Slide 454

Slide 454 text

**"Verify"users BEGIN; SELECT"nickname ""FROM"flipr.users "WHERE"FALSE; verify/users.sq verify/users.sql ROLLBACK; 104 Wednesday, May 22, 13

Slide 455

Slide 455 text

Unusered > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan >"emacs"deploy/users.sql >"emacs"verify/users.sql > 105 Wednesday, May 22, 13

Slide 456

Slide 456 text

Unusered > >"sqitch"add"users"**requires"appschema"\ ""*n"'Creates"table"to"track"our"users.' Created"deploy/users.sql Created"revert/users.sql Created"verify/users.sql Added""users"[appschema]""to"sqitch.plan >"emacs"deploy/users.sql >"emacs"verify/users.sql > >"emacs"revert/users.sql 105 Wednesday, May 22, 13

Slide 457

Slide 457 text

revert/users.sq revert/users.sql **"Revert"users BEGIN; COMMIT; **"XXX"Add"DDLs"here. 106 Wednesday, May 22, 13

Slide 458

Slide 458 text

revert/users.sq revert/users.sql **"Revert"users BEGIN; COMMIT; DROP"TABLE"flipr.users; 106 Wednesday, May 22, 13

Slide 459

Slide 459 text

Make Users > 107 Wednesday, May 22, 13

Slide 460

Slide 460 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Make Users > 107 Wednesday, May 22, 13

Slide 461

Slide 461 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Make Users > 107 Wednesday, May 22, 13

Slide 462

Slide 462 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Make Users > ""psql"*d"flipr_test"*c"'\d"flipr.users' """""Table""flipr.users" ""Column""|"Type"|"Modifiers" **********+******+*********** "nickname"|"text"|" > 107 Wednesday, May 22, 13

Slide 463

Slide 463 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Make Users > ""psql"*d"flipr_test"*c"'\d"flipr.users' """""Table""flipr.users" ""Column""|"Type"|"Modifiers" **********+******+*********** "nickname"|"text"|" > ""sqitch"verify Verifying"flipr_test ""*"appschema".."ok ""*"users"......"ok Verify"successful > 107 Wednesday, May 22, 13

Slide 464

Slide 464 text

Make Users > 108 Wednesday, May 22, 13

Slide 465

Slide 465 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist 1..1 ok All"tests"successful. Files=1,"Tests=1,""1"wallclock"secs Result:"PASS > Make Users > 108 Wednesday, May 22, 13

Slide 466

Slide 466 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist 1..1 ok All"tests"successful. Files=1,"Tests=1,""1"wallclock"secs Result:"PASS > Make Users > 108 Wednesday, May 22, 13

Slide 467

Slide 467 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist 1..1 ok All"tests"successful. Files=1,"Tests=1,""1"wallclock"secs Result:"PASS > Make Users > Woohoo! 108 Wednesday, May 22, 13

Slide 468

Slide 468 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist 1..1 ok All"tests"successful. Files=1,"Tests=1,""1"wallclock"secs Result:"PASS > Make Users > ""emacs"test/users.sql > 108 Wednesday, May 22, 13

Slide 469

Slide 469 text

SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); test/users.sql Columnist SELECT"finish(); ROLLBACK; 109 Wednesday, May 22, 13

Slide 470

Slide 470 text

SELECT"has_column("'users',"'nickname'""); SELECT"has_column("'users',"'password'""); SELECT"has_column("'users',"'timestamp'"); SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; BEGIN; SELECT"no_plan(); SET"search_path"TO"flipr,public; SELECT"has_table("'users'"); test/users.sql Columnist SELECT"finish(); ROLLBACK; 109 Wednesday, May 22, 13

Slide 471

Slide 471 text

Dead Again > 110 Wednesday, May 22, 13

Slide 472

Slide 472 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist ok"2"*"Column"users.nickname"should"exist not"ok"3"*"Column"users.password"should"exist #"Failed"test"3:""Column"users.password"should"exist" not"ok"4"*"Column"users."timestamp""should"exist #"Failed"test"4:""Column"users."timestamp""should"exist" 1..4 #"Looks"like"you"failed"2"tests"of"4 Failed"2/4"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"4"Failed:"2) ""Failed"tests:""3*4 Files=1,"Tests=4,""0"wallclock"secs Result:"FAIL Dead Again > 110 Wednesday, May 22, 13

Slide 473

Slide 473 text

""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist ok"2"*"Column"users.nickname"should"exist not"ok"3"*"Column"users.password"should"exist #"Failed"test"3:""Column"users.password"should"exist" not"ok"4"*"Column"users."timestamp""should"exist #"Failed"test"4:""Column"users."timestamp""should"exist" 1..4 #"Looks"like"you"failed"2"tests"of"4 Failed"2/4"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"4"Failed:"2) ""Failed"tests:""3*4 Files=1,"Tests=4,""0"wallclock"secs Result:"FAIL Dead Again > Guess we should add them. 110 Wednesday, May 22, 13

Slide 474

Slide 474 text

MOAR Deploy > 111 Wednesday, May 22, 13

Slide 475

Slide 475 text

>"emacs"deploy/users.sql > MOAR Deploy > 111 Wednesday, May 22, 13

Slide 476

Slide 476 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT deploy/users.sq deploy/users.sql ); COMMIT; 112 Wednesday, May 22, 13

Slide 477

Slide 477 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT """""""""""""""""", """"password""TEXT, """"timestamp"TIMESTAMPTZ deploy/users.sq deploy/users.sql ); COMMIT; 112 Wednesday, May 22, 13

Slide 478

Slide 478 text

>"emacs"deploy/users.sql > Update Verify > 113 Wednesday, May 22, 13

Slide 479

Slide 479 text

>"emacs"deploy/users.sql > Update Verify > ""emacs"verify/users.sql > 113 Wednesday, May 22, 13

Slide 480

Slide 480 text

**"Verify"users BEGIN; SELECT"nickname ""FROM"flipr.users "WHERE"FALSE; COMMIT; verify/users.sq verify/users.sql 114 Wednesday, May 22, 13

Slide 481

Slide 481 text

**"Verify"users BEGIN; SELECT"nickname ""FROM"flipr.users "WHERE"FALSE; COMMIT; ,"password,"timestamp verify/users.sq verify/users.sql 114 Wednesday, May 22, 13

Slide 482

Slide 482 text

Revert Overhead >"emacs"deploy/users.sql >"emacs"verify/users.sql > 115 Wednesday, May 22, 13

Slide 483

Slide 483 text

Revert Overhead ""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > >"emacs"deploy/users.sql >"emacs"verify/users.sql > 115 Wednesday, May 22, 13

Slide 484

Slide 484 text

Revert Overhead ""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > Yes, really. >"emacs"deploy/users.sql >"emacs"verify/users.sql > 115 Wednesday, May 22, 13

Slide 485

Slide 485 text

Revert Overhead ""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > >"emacs"deploy/users.sql >"emacs"verify/users.sql > 115 Wednesday, May 22, 13

Slide 486

Slide 486 text

Revert Overhead ""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > Remove >"emacs"deploy/users.sql >"emacs"verify/users.sql > 115 Wednesday, May 22, 13

Slide 487

Slide 487 text

Revert Overhead ""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > >"emacs"deploy/users.sql >"emacs"verify/users.sql > What’s that? 115 Wednesday, May 22, 13

Slide 488

Slide 488 text

Sqitch Tags antisocial network 116 Wednesday, May 22, 13

Slide 489

Slide 489 text

Sqitch Tags Start with @ antisocial network 116 Wednesday, May 22, 13

Slide 490

Slide 490 text

Sqitch Tags Start with @ To distinguish from changes antisocial network 116 Wednesday, May 22, 13

Slide 491

Slide 491 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: antisocial network 116 Wednesday, May 22, 13

Slide 492

Slide 492 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: @HEAD Last change antisocial network 116 Wednesday, May 22, 13

Slide 493

Slide 493 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: @HEAD Last change @ROOT First change antisocial network 116 Wednesday, May 22, 13

Slide 494

Slide 494 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: @HEAD Last change @ROOT First change Two modifiers: antisocial network 116 Wednesday, May 22, 13

Slide 495

Slide 495 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: @HEAD Last change @ROOT First change Two modifiers: ^ Previous change antisocial network 116 Wednesday, May 22, 13

Slide 496

Slide 496 text

Sqitch Tags Start with @ To distinguish from changes Two symbolic tags: @HEAD Last change @ROOT First change Two modifiers: ^ Previous change ~ Following change antisocial network 116 Wednesday, May 22, 13

Slide 497

Slide 497 text

Specifying Changes antisocial network 117 Wednesday, May 22, 13

Slide 498

Slide 498 text

Specifying Changes users Change named “users” antisocial network 117 Wednesday, May 22, 13

Slide 499

Slide 499 text

Specifying Changes users Change named “users” @HEAD^ Second to last change antisocial network 117 Wednesday, May 22, 13

Slide 500

Slide 500 text

Specifying Changes users Change named “users” @HEAD^ Second to last change users^ Change before users antisocial network 117 Wednesday, May 22, 13

Slide 501

Slide 501 text

Specifying Changes users Change named “users” @HEAD^ Second to last change users^ Change before users @ROOT~ Second change antisocial network 117 Wednesday, May 22, 13

Slide 502

Slide 502 text

Specifying Changes users Change named “users” @HEAD^ Second to last change users^ Change before users @ROOT~ Second change appschema~ Change after appschema antisocial network 117 Wednesday, May 22, 13

Slide 503

Slide 503 text

Specifying Changes users Change named “users” @HEAD^ Second to last change users^ Change before users @ROOT~ Second change appschema~ Change after appschema @HEAD^^ Third to last change antisocial network 117 Wednesday, May 22, 13

Slide 504

Slide 504 text

Specifying Changes users Change named “users” @HEAD^ Second to last change users^ Change before users @ROOT~ Second change appschema~ Change after appschema @HEAD^^ Third to last change users~4 4th change after users antisocial network 117 Wednesday, May 22, 13

Slide 505

Slide 505 text

>""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > Whither Users > 118 Wednesday, May 22, 13

Slide 506

Slide 506 text

>""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > Whither Users > >"psql"*d"flipr_test"*c"'\d"flipr.users' Did"not"find"any"relation"named""flipr.users". > 118 Wednesday, May 22, 13

Slide 507

Slide 507 text

>""sqitch"revert"**to"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok > ""sqitch"status #"On"database"flipr_test #"Project:""flipr #"Change:"""748346dfe73cf2af32a8b7088fd75ad8d7aecda3 #"Name:"""""appschema #"Deployed:"2013*05*21"15:10:02"*0400 #"By:"""""""David"E."Wheeler" #" Undeployed"change: ""*"users Whither Users > >"psql"*d"flipr_test"*c"'\d"flipr.users' Did"not"find"any"relation"named""flipr.users". > 118 Wednesday, May 22, 13

Slide 508

Slide 508 text

Whither Users > 119 Wednesday, May 22, 13

Slide 509

Slide 509 text

>"sqitch"verify Verifying"flipr_test ""*"appschema".."ok Undeployed"change: ""*"users Verify"successful > Whither Users > 119 Wednesday, May 22, 13

Slide 510

Slide 510 text

Back At It > 120 Wednesday, May 22, 13

Slide 511

Slide 511 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Back At It > 120 Wednesday, May 22, 13

Slide 512

Slide 512 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Back At It > Add 120 Wednesday, May 22, 13

Slide 513

Slide 513 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Back At It > ""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist ok"2"*"Column"users.nickname"should"exist ok"3"*"Column"users.password"should"exist ok"4"*"Column"users."timestamp""should"exist 1..4 ok All"tests"successful. Files=1,"Tests=4,""0"wallclock"secs Result:"PASS > 120 Wednesday, May 22, 13

Slide 514

Slide 514 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Back At It > ""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist ok"2"*"Column"users.nickname"should"exist ok"3"*"Column"users.password"should"exist ok"4"*"Column"users."timestamp""should"exist 1..4 ok All"tests"successful. Files=1,"Tests=4,""0"wallclock"secs Result:"PASS > Woot! 120 Wednesday, May 22, 13

Slide 515

Slide 515 text

""sqitch"deploy Deploying"changes"to"flipr_test ""+"users".."ok > Back At It > ""pg_prove"*d"flipr_test"*v"test/users.sql test/users.sql".." ok"1"*"Table"users"should"exist ok"2"*"Column"users.nickname"should"exist ok"3"*"Column"users.password"should"exist ok"4"*"Column"users."timestamp""should"exist 1..4 ok All"tests"successful. Files=1,"Tests=4,""0"wallclock"secs Result:"PASS > ""emacs"verify/users.sql 120 Wednesday, May 22, 13

Slide 516

Slide 516 text

SET"search_path"="public,tap; BEGIN; SELECT"*"FROM"no_plan(); SELECT"has_table(""'users'"); SELECT"has_column(""""""""'users',"'timestamp'"); test/users.sql SELECT"has_column(""""""""'users',"'nickname'"); SELECT"has_column(""""""""'users',"'password'"); SELECT"finish(); ROLLBACK; 121 Wednesday, May 22, 13

Slide 517

Slide 517 text

SET"search_path"="public,tap; BEGIN; SELECT"*"FROM"no_plan(); SELECT"has_table(""'users'"); SELECT"has_column(""""""""'users',"'timestamp'"); test/users.sql SELECT"has_column(""""""""'users',"'nickname'"); SELECT"has_column(""""""""'users',"'password'"); SELECT"has_pk("""""'users'"); SELECT"finish(); ROLLBACK; 121 Wednesday, May 22, 13

Slide 518

Slide 518 text

SELECT"col_type_is("""""""'users',"'nickname',"'text'"); SELECT"col_hasnt_default("'users',"'nickname'"); SELECT"col_is_pk("""""""""'users',"'nickname'"); SET"search_path"="public,tap; BEGIN; SELECT"*"FROM"no_plan(); SELECT"has_table(""'users'"); SELECT"has_column(""""""""'users',"'timestamp'"); test/users.sql SELECT"has_column(""""""""'users',"'nickname'"); SELECT"has_column(""""""""'users',"'password'"); SELECT"has_pk("""""'users'"); SELECT"finish(); ROLLBACK; 121 Wednesday, May 22, 13

Slide 519

Slide 519 text

SELECT"col_type_is("""""""'users',"'nickname',"'text'"); SELECT"col_hasnt_default("'users',"'nickname'"); SELECT"col_is_pk("""""""""'users',"'nickname'"); SET"search_path"="public,tap; BEGIN; SELECT"*"FROM"no_plan(); SELECT"has_table(""'users'"); SELECT"has_column(""""""""'users',"'timestamp'"); test/users.sql SELECT"has_column(""""""""'users',"'nickname'"); SELECT"has_column(""""""""'users',"'password'"); SELECT"has_pk("""""'users'"); SELECT"col_type_is("""""""'users',"'password',"'text'"); SELECT"col_not_null(""""""'users',"'password'"); SELECT"col_hasnt_default("'users',"'password'"); SELECT"finish(); ROLLBACK; 121 Wednesday, May 22, 13

Slide 520

Slide 520 text

SELECT"col_type_is("""""""'users',"'nickname',"'text'"); SELECT"col_hasnt_default("'users',"'nickname'"); SELECT"col_is_pk("""""""""'users',"'nickname'"); SET"search_path"="public,tap; BEGIN; SELECT"*"FROM"no_plan(); SELECT"has_table(""'users'"); SELECT"has_column(""""""""'users',"'timestamp'"); test/users.sql SELECT"has_column(""""""""'users',"'nickname'"); SELECT"has_column(""""""""'users',"'password'"); SELECT"has_pk("""""'users'"); SELECT"col_type_is('users',"'timestamp',"'timestamp"with"time"zone'); SELECT"col_not_null(""""""'users',"'timestamp'"); SELECT"col_has_default("""'users',"'timestamp'"); SELECT"col_default_is(""""'users',"'timestamp',"'now()'"); SELECT"col_type_is("""""""'users',"'password',"'text'"); SELECT"col_not_null(""""""'users',"'password'"); SELECT"col_hasnt_default("'users',"'password'"); SELECT"finish(); ROLLBACK; 121 Wednesday, May 22, 13

Slide 521

Slide 521 text

Columny > 122 Wednesday, May 22, 13

Slide 522

Slide 522 text

>"pg_prove"*d"flipr_test"test/users.sql test/users.sql".."1/?" #"Failed"test"2:""Table"users"should"have"a"primary"key" #"Failed"test"6:""Column"users(nickname)"should"be"a"primary"key" #"""""""""have:"NULL #"""""""""want:"{nickname} #"Failed"test"9:""Column"users.password"should"be"NOT"NULL" #"Failed"test"13:""Column"users."timestamp""should"be"NOT"NULL" #"Failed"test"14:""Column"users."timestamp""should"have"a"default" #"Failed"test"15:""Column"users."timestamp""should"default"to"'now()'" #"""""Column"users."timestamp""has"no"default #"Looks"like"you"failed"6"tests"of"15 test/users.sql".."Failed"6/15"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"15"Failed:"6) ""Failed"tests:""2,"6,"9,"13*15 Files=1,"Tests=15,""0"wallclock"secs Result:"FAIL Columny > 122 Wednesday, May 22, 13

Slide 523

Slide 523 text

>"pg_prove"*d"flipr_test"test/users.sql test/users.sql".."1/?" #"Failed"test"2:""Table"users"should"have"a"primary"key" #"Failed"test"6:""Column"users(nickname)"should"be"a"primary"key" #"""""""""have:"NULL #"""""""""want:"{nickname} #"Failed"test"9:""Column"users.password"should"be"NOT"NULL" #"Failed"test"13:""Column"users."timestamp""should"be"NOT"NULL" #"Failed"test"14:""Column"users."timestamp""should"have"a"default" #"Failed"test"15:""Column"users."timestamp""should"default"to"'now()'" #"""""Column"users."timestamp""has"no"default #"Looks"like"you"failed"6"tests"of"15 test/users.sql".."Failed"6/15"subtests" Test"Summary"Report ******************* test/users.sql"(Wstat:"0"Tests:"15"Failed:"6) ""Failed"tests:""2,"6,"9,"13*15 Files=1,"Tests=15,""0"wallclock"secs Result:"FAIL Columny > Let’s make it so. 122 Wednesday, May 22, 13

Slide 524

Slide 524 text

User Typography > 123 Wednesday, May 22, 13

Slide 525

Slide 525 text

""emacs"deploy/users.sql > User Typography > 123 Wednesday, May 22, 13

Slide 526

Slide 526 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT """"password""TEXT """"timestamp"TIMESTAMPTZ ); COMMIT; deploy/users.sq deploy/users.sql , , 124 Wednesday, May 22, 13

Slide 527

Slide 527 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT """"password""TEXT """"timestamp"TIMESTAMPTZ ); COMMIT; deploy/users.sq deploy/users.sql , """"""""PRIMARY"KEY, 124 Wednesday, May 22, 13

Slide 528

Slide 528 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT """"password""TEXT """"timestamp"TIMESTAMPTZ ); COMMIT; deploy/users.sq deploy/users.sql """"""""PRIMARY"KEY, """"""""NOT"NULL, 124 Wednesday, May 22, 13

Slide 529

Slide 529 text

**"Deploy"users **"requires:"appschema BEGIN; SET"client_min_messages"="'warning'; CREATE"TABLE"flipr.users"( """"nickname""TEXT """"password""TEXT """"timestamp"TIMESTAMPTZ ); COMMIT; deploy/users.sq deploy/users.sql """"""""PRIMARY"KEY, """"""""NOT"NULL, "NOT"NULL"DEFAULT"NOW() 124 Wednesday, May 22, 13

Slide 530

Slide 530 text

User Typography >"emacs"deploy/users.sql > 125 Wednesday, May 22, 13

Slide 531

Slide 531 text

""sqitch"rebase"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok Deploying"changes"to"flipr_test ""+"users".."ok > User Typography >"emacs"deploy/users.sql > 125 Wednesday, May 22, 13

Slide 532

Slide 532 text

""sqitch"rebase"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok Deploying"changes"to"flipr_test ""+"users".."ok > User Typography >"emacs"deploy/users.sql > 125 Wednesday, May 22, 13

Slide 533

Slide 533 text

""sqitch"rebase"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok Deploying"changes"to"flipr_test ""+"users".."ok > User Typography >"emacs"deploy/users.sql > 125 Wednesday, May 22, 13

Slide 534

Slide 534 text

""sqitch"rebase"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok Deploying"changes"to"flipr_test ""+"users".."ok > User Typography >"emacs"deploy/users.sql > ""pg_prove"*d"flipr_test"test/users.sql test/users.sql".."ok"""" All"tests"successful. Files=1,"Tests=15,""0"wallclock"secs Result:"PASS > 125 Wednesday, May 22, 13

Slide 535

Slide 535 text

""sqitch"rebase"@HEAD^"*y Reverting"changes"to"appschema"from"flipr_test ""*"users".."ok Deploying"changes"to"flipr_test ""+"users".."ok > User Typography >"emacs"deploy/users.sql > ""pg_prove"*d"flipr_test"test/users.sql test/users.sql".."ok"""" All"tests"successful. Files=1,"Tests=15,""0"wallclock"secs Result:"PASS > Boom. 125 Wednesday, May 22, 13

Slide 536

Slide 536 text

Additives > 126 Wednesday, May 22, 13

Slide 537

Slide 537 text

Additives > ""git"add". > 126 Wednesday, May 22, 13

Slide 538

Slide 538 text

Additives > ""git"add". > ""git"commit"*am"'Add"users"table.' [users"610b318]"Add"users"table. "5"files"changed,"59"insertions(+) "create"mode"100644"deploy/users.sql "create"mode"100644"revert/users.sql "create"mode"100644"test/users.sql "create"mode"100644"verify/users.sql > 126 Wednesday, May 22, 13

Slide 539

Slide 539 text

Pushers > 127 Wednesday, May 22, 13

Slide 540

Slide 540 text

Pushers > ""git"push"**set*upstream"origin"users Counting"objects:"17,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(11/11),"1.53"KiB,"done. Total"11"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""users"*>"users Branch"users"set"up"to"track"remote"branch"users" from"origin. > 127 Wednesday, May 22, 13

Slide 541

Slide 541 text

Pushers > ""git"push"**set*upstream"origin"users Counting"objects:"17,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(11/11),"1.53"KiB,"done. Total"11"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""users"*>"users Branch"users"set"up"to"track"remote"branch"users" from"origin. > 127 Wednesday, May 22, 13

Slide 542

Slide 542 text

Pushers > ""git"push"**set*upstream"origin"users Counting"objects:"17,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(11/11),"1.53"KiB,"done. Total"11"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""users"*>"users Branch"users"set"up"to"track"remote"branch"users" from"origin. > 127 Wednesday, May 22, 13

Slide 543

Slide 543 text

Wash, Rinse, Repeat antisocial network 128 Wednesday, May 22, 13

Slide 544

Slide 544 text

Wash, Rinse, Repeat Add failing simple test antisocial network 128 Wednesday, May 22, 13

Slide 545

Slide 545 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change antisocial network 128 Wednesday, May 22, 13

Slide 546

Slide 546 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change Revise test antisocial network 128 Wednesday, May 22, 13

Slide 547

Slide 547 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change Revise test Revise and rebase change antisocial network 128 Wednesday, May 22, 13

Slide 548

Slide 548 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change Revise test Revise and rebase change Wash, Rinse, Repeat antisocial network 128 Wednesday, May 22, 13

Slide 549

Slide 549 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change Revise test Revise and rebase change Wash, Rinse, Repeat Commit/Push when done antisocial network 128 Wednesday, May 22, 13

Slide 550

Slide 550 text

Wash, Rinse, Repeat Add failing simple test Add and deploy change Revise test Revise and rebase change Wash, Rinse, Repeat Commit/Push when done Breathe in, breathe out antisocial network 128 Wednesday, May 22, 13

Slide 551

Slide 551 text

Time to Work! antisocial network 129 Wednesday, May 22, 13

Slide 552

Slide 552 text

Time to Work! Prepare to hack! antisocial network 129 Wednesday, May 22, 13

Slide 553

Slide 553 text

Time to Work! Prepare to hack! git checkout master antisocial network 129 Wednesday, May 22, 13

Slide 554

Slide 554 text

Time to Work! Prepare to hack! git checkout master git branch -D users antisocial network 129 Wednesday, May 22, 13

Slide 555

Slide 555 text

Time to Work! Prepare to hack! git checkout master git branch -D users git checkout -b users antisocial network 129 Wednesday, May 22, 13

Slide 556

Slide 556 text

Time to Work! Prepare to hack! git checkout master git branch -D users git checkout -b users git reset --hard upstream/users antisocial network 129 Wednesday, May 22, 13

Slide 557

Slide 557 text

Time to Work! Prepare to hack! git checkout master git branch -D users git checkout -b users git reset --hard upstream/users git log antisocial network 129 Wednesday, May 22, 13

Slide 558

Slide 558 text

Time to Work! Prepare to hack! git checkout master git branch -D users git checkout -b users git reset --hard upstream/users git log Should be at “Add users table.” antisocial network 129 Wednesday, May 22, 13

Slide 559

Slide 559 text

Caution: Hard Reset Ahead 130 Wednesday, May 22, 13

Slide 560

Slide 560 text

Caution: Hard Reset Ahead A rare destructive Git command 130 Wednesday, May 22, 13

Slide 561

Slide 561 text

Caution: Hard Reset Ahead A rare destructive Git command Deletes HEAD snapshot 130 Wednesday, May 22, 13

Slide 562

Slide 562 text

Caution: Hard Reset Ahead A rare destructive Git command Deletes HEAD snapshot Replaces it with new snapshot 130 Wednesday, May 22, 13

Slide 563

Slide 563 text

Caution: Hard Reset Ahead A rare destructive Git command Deletes HEAD snapshot Replaces it with new snapshot Almost un-reversible 130 Wednesday, May 22, 13

Slide 564

Slide 564 text

Caution: Hard Reset Ahead A rare destructive Git command Deletes HEAD snapshot Replaces it with new snapshot Almost un-reversible Useful for starting from known point 130 Wednesday, May 22, 13

Slide 565

Slide 565 text

Caution: Hard Reset Ahead A rare destructive Git command Deletes HEAD snapshot Replaces it with new snapshot Almost un-reversible Useful for starting from known point USE WITH CAUTION! 130 Wednesday, May 22, 13

Slide 566

Slide 566 text

antisocial network Flip Out 131 Wednesday, May 22, 13

Slide 567

Slide 567 text

antisocial network Flip Out Create flips branch 131 Wednesday, May 22, 13

Slide 568

Slide 568 text

antisocial network Flip Out Create flips branch Create flips table 131 Wednesday, May 22, 13

Slide 569

Slide 569 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK 131 Wednesday, May 22, 13

Slide 570

Slide 570 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK nickname FK 131 Wednesday, May 22, 13

Slide 571

Slide 571 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK nickname FK body TEXT 131 Wednesday, May 22, 13

Slide 572

Slide 572 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK nickname FK body TEXT timestamptz 131 Wednesday, May 22, 13

Slide 573

Slide 573 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK nickname FK body TEXT timestamptz Use TDDD 131 Wednesday, May 22, 13

Slide 574

Slide 574 text

antisocial network Flip Out Create flips branch Create flips table flip_id SERIAL PK nickname FK body TEXT timestamptz Use TDDD https:/ /github.com/ theory/agile-flipr.git 131 Wednesday, May 22, 13

Slide 575

Slide 575 text

Functional Testing > 132 Wednesday, May 22, 13

Slide 576

Slide 576 text

Functional Testing ""git"checkout"*b"userfuncs"users Switched"to"a"new"branch"'userfuncs' > > Branches from users 132 Wednesday, May 22, 13

Slide 577

Slide 577 text

Functional Testing ""git"checkout"*b"userfuncs"users Switched"to"a"new"branch"'userfuncs' > > ""sqitch"add"insert_user"*r"users"*r"appschema"\ """"""*n"'Creates"a"function"to"insert"a"user.' Created"deploy/insert_user.sql Created"revert/insert_user.sql Created"verify/insert_user.sql Added""insert_user"[users"appschema]""to"sqitch.plan > 132 Wednesday, May 22, 13

Slide 578

Slide 578 text

Functional Testing ""git"checkout"*b"userfuncs"users Switched"to"a"new"branch"'userfuncs' > > ""sqitch"add"insert_user"*r"users"*r"appschema"\ """"""*n"'Creates"a"function"to"insert"a"user.' Created"deploy/insert_user.sql Created"revert/insert_user.sql Created"verify/insert_user.sql Added""insert_user"[users"appschema]""to"sqitch.plan > ""emacs"test/insert_user.sql > 132 Wednesday, May 22, 13

Slide 579

Slide 579 text

test/insert_use test/insert_user.sql 133 Wednesday, May 22, 13

Slide 580

Slide 580 text

test/insert_use test/insert_user.sql SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; SET"search_path"TO"flipr,public; 133 Wednesday, May 22, 13

Slide 581

Slide 581 text

test/insert_use test/insert_user.sql SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; SET"search_path"TO"flipr,public; 133 Wednesday, May 22, 13

Slide 582

Slide 582 text

test/insert_use test/insert_user.sql SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; SET"search_path"TO"flipr,public; **"Plan"the"tests. BEGIN; select"plan(11); 133 Wednesday, May 22, 13

Slide 583

Slide 583 text

test/insert_use test/insert_user.sql SET"client_min_messages"TO"warning; CREATE"EXTENSION"IF"NOT"EXISTS"pgtap; RESET"client_min_messages; SET"search_path"TO"flipr,public; **"Plan"the"tests. BEGIN; select"plan(11); 133 Wednesday, May 22, 13

Slide 584

Slide 584 text

test/insert_use SELECT"plan(11); 134 Wednesday, May 22, 13

Slide 585

Slide 585 text

test/insert_use SELECT"plan(11); SELECT"has_function("'insert_user'"); SELECT"has_function( """"'insert_user',"ARRAY['text',"'text'] ); SELECT"function_lang_is( """"'insert_user',"ARRAY['text',"'text'], """"'sql' ); SELECT"function_returns( """"'insert_user',"ARRAY['text',"'text'], """"'void' ); SELECT"volatility_is( """"'insert_user',"ARRAY['text',"'text'], """"'volatile' ); 134 Wednesday, May 22, 13

Slide 586

Slide 586 text

test/insert_use SELECT"plan(11); SELECT"has_function("'insert_user'"); SELECT"has_function( """"'insert_user',"ARRAY['text',"'text'] ); SELECT"function_lang_is( """"'insert_user',"ARRAY['text',"'text'], """"'sql' ); SELECT"function_returns( """"'insert_user',"ARRAY['text',"'text'], """"'void' ); SELECT"volatility_is( """"'insert_user',"ARRAY['text',"'text'], """"'volatile' ); 134 Wednesday, May 22, 13

Slide 587

Slide 587 text

test/insert_use SELECT"plan(11); SELECT"has_function("'insert_user'"); SELECT"has_function( """"'insert_user',"ARRAY['text',"'text'] ); SELECT"function_lang_is( """"'insert_user',"ARRAY['text',"'text'], """"'sql' ); SELECT"function_returns( """"'insert_user',"ARRAY['text',"'text'], """"'void' ); SELECT"volatility_is( """"'insert_user',"ARRAY['text',"'text'], """"'volatile' ); 134 Wednesday, May 22, 13

Slide 588

Slide 588 text

test/insert_use SELECT"plan(11); SELECT"has_function("'insert_user'"); SELECT"has_function( """"'insert_user',"ARRAY['text',"'text'] ); SELECT"function_lang_is( """"'insert_user',"ARRAY['text',"'text'], """"'sql' ); SELECT"function_returns( """"'insert_user',"ARRAY['text',"'text'], """"'void' ); SELECT"volatility_is( """"'insert_user',"ARRAY['text',"'text'], """"'volatile' ); 134 Wednesday, May 22, 13

Slide 589

Slide 589 text

test/insert_use SELECT"plan(11); SELECT"has_function("'insert_user'"); SELECT"has_function( """"'insert_user',"ARRAY['text',"'text'] ); SELECT"function_lang_is( """"'insert_user',"ARRAY['text',"'text'], """"'sql' ); SELECT"function_returns( """"'insert_user',"ARRAY['text',"'text'], """"'void' ); SELECT"volatility_is( """"'insert_user',"ARRAY['text',"'text'], """"'volatile' ); 134 Wednesday, May 22, 13

Slide 590

Slide 590 text

test/insert_use test/insert_user.sql """"'volatile' ); 135 Wednesday, May 22, 13

Slide 591

Slide 591 text

test/insert_use test/insert_user.sql """"'volatile' ); SELECT"lives_ok( """"$$"SELECT"insert_user('theory',"'foo')"$$, """"'Insert"a"user' ); SELECT"row_eq( """'SELECT"*"FROM"users', """ROW('theory',"md5('foo'),"NOW())::users, """'The"user"should"have"been"inserted' ); 135 Wednesday, May 22, 13

Slide 592

Slide 592 text

test/insert_use test/insert_user.sql """"'volatile' ); SELECT"lives_ok( """"$$"SELECT"insert_user('theory',"'foo')"$$, """"'Insert"a"user' ); SELECT"row_eq( """'SELECT"*"FROM"users', """ROW('theory',"md5('foo'),"NOW())::users, """'The"user"should"have"been"inserted' ); 135 Wednesday, May 22, 13

Slide 593

Slide 593 text

test/insert_use test/insert_user.sql """"'volatile' ); SELECT"lives_ok( """"$$"SELECT"insert_user('theory',"'foo')"$$, """"'Insert"a"user' ); SELECT"row_eq( """'SELECT"*"FROM"users', """ROW('theory',"md5('foo'),"NOW())::users, """'The"user"should"have"been"inserted' ); 135 Wednesday, May 22, 13

Slide 594

Slide 594 text

test/insert_use test/insert_user.sql """"'volatile' ); SELECT"lives_ok( """"$$"SELECT"insert_user('theory',"'foo')"$$, """"'Insert"a"user' ); SELECT"row_eq( """'SELECT"*"FROM"users', """ROW('theory',"md5('foo'),"NOW())::users, """'The"user"should"have"been"inserted' ); 135 Wednesday, May 22, 13

Slide 595

Slide 595 text

test/insert_use test/insert_user.sql """"'volatile' ); SELECT"lives_ok( """"$$"SELECT"insert_user('theory',"'foo')"$$, """"'Insert"a"user' ); SELECT"row_eq( """'SELECT"*"FROM"users', """ROW('theory',"md5('foo'),"NOW())::users, """'The"user"should"have"been"inserted' ); 135 Wednesday, May 22, 13

Slide 596

Slide 596 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); 136 Wednesday, May 22, 13

Slide 597

Slide 597 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); SELECT"lives_ok( """"$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """"'Insert"another"user' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Both"users"should"be"present' ); 136 Wednesday, May 22, 13

Slide 598

Slide 598 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); SELECT"lives_ok( """"$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """"'Insert"another"user' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Both"users"should"be"present' ); 136 Wednesday, May 22, 13

Slide 599

Slide 599 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); SELECT"lives_ok( """"$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """"'Insert"another"user' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Both"users"should"be"present' ); Includes dupes 136 Wednesday, May 22, 13

Slide 600

Slide 600 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); SELECT"lives_ok( """"$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """"'Insert"another"user' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Both"users"should"be"present' ); 136 Wednesday, May 22, 13

Slide 601

Slide 601 text

test/insert_use test/insert_user.sql """'The"user"should"have"been"inserted' ); SELECT"lives_ok( """"$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """"'Insert"another"user' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Both"users"should"be"present' ); 136 Wednesday, May 22, 13

Slide 602

Slide 602 text

test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 603

Slide 603 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 604

Slide 604 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 605

Slide 605 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); Appendix A 137 Wednesday, May 22, 13

Slide 606

Slide 606 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 607

Slide 607 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 608

Slide 608 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); 137 Wednesday, May 22, 13

Slide 609

Slide 609 text

SELECT"throws_ok( """"$$"SELECT"insert_user('theory',"'ha*ha')"$$, """"23505,"**"duplicate"key"violation """"NULL,""**"localized"error"message """"'Should"get"an"error"for"duplicate"nickname' ); SELECT"bag_eq( """"'SELECT"*"FROM"users', """"$$"VALUES """"""""('theory',""""md5('foo'),""NOW()), """"""""('strongrrl',"md5('w00t'),"NOW()) """"$$, """"'Should"still"have"just"the"two"users' ); test/insert_use """"'Both"users"should"be"present' ); SELECT"finish(); ROLLBACK; 137 Wednesday, May 22, 13

Slide 610

Slide 610 text

Functional Testing ""emacs"test/insert_user.sql > > 138 Wednesday, May 22, 13

Slide 611

Slide 611 text

Functional Testing ""emacs"test/insert_user.sql > > ""emacs"deploy/insert_user.sql > 138 Wednesday, May 22, 13

Slide 612

Slide 612 text

deploy/insert_u deploy/insert_user.sql **"Deploy"insert_user **"requires:"users **"requires:"appschema BEGIN; **"XXX"Add"DDLs"here. COMMIT; 139 Wednesday, May 22, 13

Slide 613

Slide 613 text

deploy/insert_u deploy/insert_user.sql **"Deploy"insert_user **"requires:"users **"requires:"appschema BEGIN; CREATE"OR"REPLACE"FUNCTION"flipr.insert_user( """"nickname"TEXT, """"password"TEXT )"RETURNS"VOID"LANGUAGE"SQL"SECURITY"DEFINER"AS"$$ """"INSERT"INTO"flipr.users"VALUES($1,"md5($2)); $$; COMMIT; 139 Wednesday, May 22, 13

Slide 614

Slide 614 text

Functional Testing ""emacs"deploy/insert_user.sql > > 140 Wednesday, May 22, 13

Slide 615

Slide 615 text

Functional Testing ""emacs"deploy/insert_user.sql > > ""emacs"revert/insert_user.sql > 140 Wednesday, May 22, 13

Slide 616

Slide 616 text

revert/insert_u revert/insert_user.sql **"Revert"insert_user BEGIN; COMMIT; **"XXX"Add"DDLs"here. 141 Wednesday, May 22, 13

Slide 617

Slide 617 text

revert/insert_u revert/insert_user.sql **"Revert"insert_user BEGIN; COMMIT; DROP"FUNCTION"flipr.insert_user(TEXT,"TEXT); 141 Wednesday, May 22, 13

Slide 618

Slide 618 text

Functional Testing ""emacs"revert/insert_user.sql > > 142 Wednesday, May 22, 13

Slide 619

Slide 619 text

Functional Testing ""emacs"revert/insert_user.sql > > ""emacs"verify/insert_user.sql > 142 Wednesday, May 22, 13

Slide 620

Slide 620 text

verify/insert_u verify/insert_user.sql **"Verify"insert_user BEGIN; **"XXX"Add"DDLs"here. ROLLBACK; 143 Wednesday, May 22, 13

Slide 621

Slide 621 text

verify/insert_u verify/insert_user.sql **"Verify"insert_user BEGIN; SELECT"has_function_privilege( """"'flipr.insert_user(text,"text)', """"'execute' ); ROLLBACK; 143 Wednesday, May 22, 13

Slide 622

Slide 622 text

verify/insert_u verify/insert_user.sql **"Verify"insert_user BEGIN; SELECT"has_function_privilege( """"'flipr.insert_user(text,"text)', """"'execute' ); ROLLBACK; Convenient! 143 Wednesday, May 22, 13

Slide 623

Slide 623 text

We Good? ""emacs"verify/insert_user.sql > > 144 Wednesday, May 22, 13

Slide 624

Slide 624 text

We Good? ""emacs"verify/insert_user.sql > > ""pg_prove"*d"flipr_test"test/*.sql"""""""""" test/appschema.sql"...."ok""" test/insert_user.sql".."ok""""" test/users.sql"........"ok"""" All"tests"successful. Files=3,"Tests=27,""0"wallclock"secs Result:"PASS > 144 Wednesday, May 22, 13

Slide 625

Slide 625 text

Commitment > 145 Wednesday, May 22, 13

Slide 626

Slide 626 text

""git"add". >"git"commit"*m"'Add"`insert_user()`.' [userfuncs"40eabe1]"Add"`insert_user()`. "6"files"changed,"101"insertions(+) "create"mode"100644"*n "create"mode"100644"deploy/insert_user.sql "create"mode"100644"revert/insert_user.sql "create"mode"100644"test/insert_user.sql "create"mode"100644"verify/insert_user.sql > Commitment > 145 Wednesday, May 22, 13

Slide 627

Slide 627 text

Push It Real Good… > 146 Wednesday, May 22, 13

Slide 628

Slide 628 text

""git"push"origin"**set*upstream"userfuncs Counting"objects:"18,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(12/12),"1.96"KiB,"done. Total"12"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""userfuncs"*>"userfuncs Branch"userfuncs"set"up"to"track"remote"branch" userfuncs"from"origin. > Push It Real Good… > 146 Wednesday, May 22, 13

Slide 629

Slide 629 text

""git"push"origin"**set*upstream"userfuncs Counting"objects:"18,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(12/12),"1.96"KiB,"done. Total"12"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""userfuncs"*>"userfuncs Branch"userfuncs"set"up"to"track"remote"branch" userfuncs"from"origin. > Push It Real Good… > 146 Wednesday, May 22, 13

Slide 630

Slide 630 text

""git"push"origin"**set*upstream"userfuncs Counting"objects:"18,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(11/11),"done. Writing"objects:"100%"(12/12),"1.96"KiB,"done. Total"12"(delta"1),"reused"0"(delta"0) To"../flipr*remote "*"[new"branch]""""""userfuncs"*>"userfuncs Branch"userfuncs"set"up"to"track"remote"branch" userfuncs"from"origin. > Push It Real Good… > 146 Wednesday, May 22, 13

Slide 631

Slide 631 text

Reset, Mes Amis! antisocial network 147 Wednesday, May 22, 13

Slide 632

Slide 632 text

Reset, Mes Amis! git checkout users antisocial network 147 Wednesday, May 22, 13

Slide 633

Slide 633 text

Reset, Mes Amis! git checkout users git reset --hard upstream/users antisocial network 147 Wednesday, May 22, 13

Slide 634

Slide 634 text

Reset, Mes Amis! git checkout users git reset --hard upstream/users git checkout -b userfuncs antisocial network 147 Wednesday, May 22, 13

Slide 635

Slide 635 text

Reset, Mes Amis! git checkout users git reset --hard upstream/users git checkout -b userfuncs git reset --hard insert_user antisocial network 147 Wednesday, May 22, 13

Slide 636

Slide 636 text

antisocial network None Shall Pass 148 Wednesday, May 22, 13

Slide 637

Slide 637 text

antisocial network None Shall Pass Create change_pass() 148 Wednesday, May 22, 13

Slide 638

Slide 638 text

antisocial network None Shall Pass Create change_pass() Params: 148 Wednesday, May 22, 13

Slide 639

Slide 639 text

antisocial network None Shall Pass Create change_pass() Params: nickname 148 Wednesday, May 22, 13

Slide 640

Slide 640 text

antisocial network None Shall Pass Create change_pass() Params: nickname old_pass 148 Wednesday, May 22, 13

Slide 641

Slide 641 text

antisocial network None Shall Pass Create change_pass() Params: nickname old_pass new_pass 148 Wednesday, May 22, 13

Slide 642

Slide 642 text

antisocial network None Shall Pass Create change_pass() Params: nickname old_pass new_pass Only update if old pass correct 148 Wednesday, May 22, 13

Slide 643

Slide 643 text

antisocial network None Shall Pass Create change_pass() Params: nickname old_pass new_pass Only update if old pass correct Use TDDD 148 Wednesday, May 22, 13

Slide 644

Slide 644 text

antisocial network None Shall Pass Create change_pass() Params: nickname old_pass new_pass Only update if old pass correct Use TDDD https:/ /github.com/ theory/agile-flipr.git 148 Wednesday, May 22, 13

Slide 645

Slide 645 text

Resets > 149 Wednesday, May 22, 13

Slide 646

Slide 646 text

>"git"reset"**hard"upstream/userfuncs HEAD"is"now"at"048017a"Add"`change_pass()`. > Resets > My solution 149 Wednesday, May 22, 13

Slide 647

Slide 647 text

>"git"reset"**hard"upstream/userfuncs HEAD"is"now"at"048017a"Add"`change_pass()`. > >"git"checkout"master > Resets > 149 Wednesday, May 22, 13

Slide 648

Slide 648 text

>"git"reset"**hard"upstream/userfuncs HEAD"is"now"at"048017a"Add"`change_pass()`. > ""git"reset"**hard"appschema HEAD"is"now"at"e46bdf9"Add"appschema"test. > >"git"checkout"master > Resets > 149 Wednesday, May 22, 13

Slide 649

Slide 649 text

>"git"reset"**hard"upstream/userfuncs HEAD"is"now"at"048017a"Add"`change_pass()`. > ""git"reset"**hard"appschema HEAD"is"now"at"e46bdf9"Add"appschema"test. > >"git"checkout"master > Resets > Known good. 149 Wednesday, May 22, 13

Slide 650

Slide 650 text

Mergers and Acquisitions > 150 Wednesday, May 22, 13

Slide 651

Slide 651 text

""git"merge"users"""""""""""""""""""""""""""""""""""""""""" Updating"e46bdf9..610b318 Fast*forward "deploy/users.sql"|"13"+++++++++++++ "revert/users.sql"|""7"+++++++ "sqitch.plan""""""|""1"+ "test/users.sql"""|"29"+++++++++++++++++++++++++++++ "verify/users.sql"|""9"+++++++++ "5"files"changed,"59"insertions(+) "create"mode"100644"deploy/users.sql "create"mode"100644"revert/users.sql "create"mode"100644"test/users.sql "create"mode"100644"verify/users.sql > Mergers and Acquisitions > 150 Wednesday, May 22, 13

Slide 652

Slide 652 text

""git"merge"users"""""""""""""""""""""""""""""""""""""""""" Updating"e46bdf9..610b318 Fast*forward "deploy/users.sql"|"13"+++++++++++++ "revert/users.sql"|""7"+++++++ "sqitch.plan""""""|""1"+ "test/users.sql"""|"29"+++++++++++++++++++++++++++++ "verify/users.sql"|""9"+++++++++ "5"files"changed,"59"insertions(+) "create"mode"100644"deploy/users.sql "create"mode"100644"revert/users.sql "create"mode"100644"test/users.sql "create"mode"100644"verify/users.sql > Mergers and Acquisitions > So far… 150 Wednesday, May 22, 13

Slide 653

Slide 653 text

Mergers and Acquisitions > 151 Wednesday, May 22, 13

Slide 654

Slide 654 text

>"git"merge"flips"""""""""""""""""""""""""""""""""""""""""" Updating"610b318..fbf8469 Fast*forward "deploy/flips.sql"|"15"+++++++++++++++ "revert/flips.sql"|""7"+++++++ "sqitch.plan""""""|""1"+ "test/flips.sql"""|"38"+++++++++++++++++++++++++++++++++++++ "verify/flips.sql"|"12"++++++++++++ "5"files"changed,"73"insertions(+) "create"mode"100644"deploy/flips.sql "create"mode"100644"revert/flips.sql "create"mode"100644"test/flips.sql "create"mode"100644"verify/flips.sql > Mergers and Acquisitions > 151 Wednesday, May 22, 13

Slide 655

Slide 655 text

>"git"merge"flips"""""""""""""""""""""""""""""""""""""""""" Updating"610b318..fbf8469 Fast*forward "deploy/flips.sql"|"15"+++++++++++++++ "revert/flips.sql"|""7"+++++++ "sqitch.plan""""""|""1"+ "test/flips.sql"""|"38"+++++++++++++++++++++++++++++++++++++ "verify/flips.sql"|"12"++++++++++++ "5"files"changed,"73"insertions(+) "create"mode"100644"deploy/flips.sql "create"mode"100644"revert/flips.sql "create"mode"100644"test/flips.sql "create"mode"100644"verify/flips.sql > Mergers and Acquisitions > So good… 151 Wednesday, May 22, 13

Slide 656

Slide 656 text

Mergers and Acquisitions > 152 Wednesday, May 22, 13

Slide 657

Slide 657 text

>"git"merge"userfuncs Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Automatic"merge"failed;"fix"conflicts"and"then" commit"the"result. > Mergers and Acquisitions > 152 Wednesday, May 22, 13

Slide 658

Slide 658 text

>"git"merge"userfuncs Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Automatic"merge"failed;"fix"conflicts"and"then" commit"the"result. > Mergers and Acquisitions > 152 Wednesday, May 22, 13

Slide 659

Slide 659 text

>"git"merge"userfuncs Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Automatic"merge"failed;"fix"conflicts"and"then" commit"the"result. > Mergers and Acquisitions > 152 Wednesday, May 22, 13

Slide 660

Slide 660 text

>"git"merge"userfuncs Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Automatic"merge"failed;"fix"conflicts"and"then" commit"the"result. > Mergers and Acquisitions > Wha??? 152 Wednesday, May 22, 13

Slide 661

Slide 661 text

Back in Time… > 153 Wednesday, May 22, 13

Slide 662

Slide 662 text

Back in Time… ""git"checkout"*b"userfuncs"users Switched"to"a"new"branch"'userfuncs' > > 153 Wednesday, May 22, 13

Slide 663

Slide 663 text

Back in Time… ""git"checkout"*b"userfuncs"users Switched"to"a"new"branch"'userfuncs' > > Ah-ha! 153 Wednesday, May 22, 13

Slide 664

Slide 664 text

Branching Out antisocial network 154 Wednesday, May 22, 13

Slide 665

Slide 665 text

Branching Out users branched from master antisocial network 154 Wednesday, May 22, 13

Slide 666

Slide 666 text

Branching Out users branched from master flips branched from users antisocial network 154 Wednesday, May 22, 13

Slide 667

Slide 667 text

Branching Out users branched from master flips branched from users userfuncs branched from users antisocial network 154 Wednesday, May 22, 13

Slide 668

Slide 668 text

Branching Out users branched from master flips branched from users userfuncs branched from users users and flips merged to master antisocial network 154 Wednesday, May 22, 13

Slide 669

Slide 669 text

Branching Out users branched from master flips branched from users userfuncs branched from users users and flips merged to master userfuncs unaware of flips antisocial network 154 Wednesday, May 22, 13

Slide 670

Slide 670 text

Backbrancher master A 155 Wednesday, May 22, 13

Slide 671

Slide 671 text

Backbrancher master users A branch 155 Wednesday, May 22, 13

Slide 672

Slide 672 text

Backbrancher master users A B Add users table branch 155 Wednesday, May 22, 13

Slide 673

Slide 673 text

Backbrancher master users A B flips branch branch 155 Wednesday, May 22, 13

Slide 674

Slide 674 text

Backbrancher master users A B flips C Add flips table branch branch 155 Wednesday, May 22, 13

Slide 675

Slide 675 text

Backbrancher master users A B flips C userfuncs branch branch branch 155 Wednesday, May 22, 13

Slide 676

Slide 676 text

Backbrancher master users A B flips C userfuncs Add insert_user function D branch branch branch 155 Wednesday, May 22, 13

Slide 677

Slide 677 text

Backbrancher master users A B flips C userfuncs D branch branch branch E Add change_pass function 155 Wednesday, May 22, 13

Slide 678

Slide 678 text

Backbrancher master users A B flips C userfuncs B merge B D branch branch branch E 155 Wednesday, May 22, 13

Slide 679

Slide 679 text

Backbrancher master users A B flips C userfuncs B merge B C merge C D branch branch branch E 155 Wednesday, May 22, 13

Slide 680

Slide 680 text

Backbrancher master users A B flips C userfuncs B merge B C merge C D F merge D & E branch branch branch E 155 Wednesday, May 22, 13

Slide 681

Slide 681 text

Backbrancher master users A B flips C userfuncs B merge B C merge C D No C! F merge D & E branch branch branch E 155 Wednesday, May 22, 13

Slide 682

Slide 682 text

Backbrancher master users A B flips C userfuncs B merge B C merge C D conflict! branch branch branch E 155 Wednesday, May 22, 13

Slide 683

Slide 683 text

Backbrancher master users A B flips C userfuncs B merge B C merge C D conflict! Now what? branch branch branch E 155 Wednesday, May 22, 13

Slide 684

Slide 684 text

Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch D E 156 Wednesday, May 22, 13

Slide 685

Slide 685 text

Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch Last common with master: B 156 Wednesday, May 22, 13

Slide 686

Slide 686 text

Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch C 156 Wednesday, May 22, 13

Slide 687

Slide 687 text

Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch C D Rebased E 156 Wednesday, May 22, 13

Slide 688

Slide 688 text

Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch C D E merge D & E E 156 Wednesday, May 22, 13

Slide 689

Slide 689 text

\o/ Rebase master master users A B flips C userfuncs B merge B C merge C branch branch branch C D E merge D & E E 156 Wednesday, May 22, 13

Slide 690

Slide 690 text

Reset > 157 Wednesday, May 22, 13

Slide 691

Slide 691 text

""git"reset"**hard"HEAD HEAD"is"now"at"fbf8469"Add"flips"table. > Reset > 157 Wednesday, May 22, 13

Slide 692

Slide 692 text

""git"reset"**hard"HEAD HEAD"is"now"at"fbf8469"Add"flips"table. > Reset > Use with care! 157 Wednesday, May 22, 13

Slide 693

Slide 693 text

""git"reset"**hard"HEAD HEAD"is"now"at"fbf8469"Add"flips"table. > Reset > 157 Wednesday, May 22, 13

Slide 694

Slide 694 text

""git"reset"**hard"HEAD HEAD"is"now"at"fbf8469"Add"flips"table. > Reset > ""git"checkout"userfuncs Switched"to"branch"'userfuncs' > 157 Wednesday, May 22, 13

Slide 695

Slide 695 text

Rebase > 158 Wednesday, May 22, 13

Slide 696

Slide 696 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > 158 Wednesday, May 22, 13

Slide 697

Slide 697 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > Back to B, apply C. 158 Wednesday, May 22, 13

Slide 698

Slide 698 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > That’s D 158 Wednesday, May 22, 13

Slide 699

Slide 699 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > Here comes D… 158 Wednesday, May 22, 13

Slide 700

Slide 700 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > D’oh! 158 Wednesday, May 22, 13

Slide 701

Slide 701 text

>"git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan CONFLICT"(content):"Merge"conflict"in"sqitch.plan Failed"to"merge"in"the"changes. Patch"failed"at"0001"Add"`insert_user()`. The"copy"of"the"patch"that"failed"is"found"in: """/Users/david/Desktop/flipr*db/.git/rebase*apply/patch When"you"have"resolved"this"problem,"run""git"rebase"**contin If"you"prefer"to"skip"this"patch,"run""git"rebase"**skip""ins To"check"out"the"original"branch"and"stop"rebasing,"run""git" rebase"**abort". > Rebase > 158 Wednesday, May 22, 13

Slide 702

Slide 702 text

Wha Happen? antisocial network 159 Wednesday, May 22, 13

Slide 703

Slide 703 text

Wha Happen? Same conflict antisocial network 159 Wednesday, May 22, 13

Slide 704

Slide 704 text

Wha Happen? Same conflict Both branches modified sqitch.plan antisocial network 159 Wednesday, May 22, 13

Slide 705

Slide 705 text

Wha Happen? Same conflict Both branches modified sqitch.plan The same line! antisocial network 159 Wednesday, May 22, 13

Slide 706

Slide 706 text

Wha Happen? > 160 Wednesday, May 22, 13

Slide 707

Slide 707 text

>"git"diff diff"**cc"sqitch.plan index"0d5a515,96b1b7e..0000000 ***"a/sqitch.plan +++"b/sqitch.plan @@@"*4,4"*4,4"+4,8"@@@ "" ""appschema"2013*05*15T06:03:09Z"David"E."Wheeler">>>>>>"Add"`insert_user()`. > Wha Happen? > 160 Wednesday, May 22, 13

Slide 708

Slide 708 text

>"git"diff diff"**cc"sqitch.plan index"0d5a515,96b1b7e..0000000 ***"a/sqitch.plan +++"b/sqitch.plan @@@"*4,4"*4,4"+4,8"@@@ "" ""appschema"2013*05*15T06:03:09Z"David"E."Wheeler">>>>>>"Add"`insert_user()`. > Wha Happen? > 160 Wednesday, May 22, 13

Slide 709

Slide 709 text

>"git"diff diff"**cc"sqitch.plan index"0d5a515,96b1b7e..0000000 ***"a/sqitch.plan +++"b/sqitch.plan @@@"*4,4"*4,4"+4,8"@@@ "" ""appschema"2013*05*15T06:03:09Z"David"E."Wheeler">>>>>>"Add"`insert_user()`. > Wha Happen? > B 160 Wednesday, May 22, 13

Slide 710

Slide 710 text

>"git"diff diff"**cc"sqitch.plan index"0d5a515,96b1b7e..0000000 ***"a/sqitch.plan +++"b/sqitch.plan @@@"*4,4"*4,4"+4,8"@@@ "" ""appschema"2013*05*15T06:03:09Z"David"E."Wheeler">>>>>>"Add"`insert_user()`. > Wha Happen? > C B 160 Wednesday, May 22, 13

Slide 711

Slide 711 text

>"git"diff diff"**cc"sqitch.plan index"0d5a515,96b1b7e..0000000 ***"a/sqitch.plan +++"b/sqitch.plan @@@"*4,4"*4,4"+4,8"@@@ "" ""appschema"2013*05*15T06:03:09Z"David"E."Wheeler">>>>>>"Add"`insert_user()`. > Wha Happen? > C D B 160 Wednesday, May 22, 13

Slide 712

Slide 712 text

Scratch that Sqitch antisocial network 161 Wednesday, May 22, 13

Slide 713

Slide 713 text

Scratch that Sqitch Screwed either way? antisocial network 161 Wednesday, May 22, 13

Slide 714

Slide 714 text

Scratch that Sqitch Screwed either way? Fortunately, this is Git antisocial network 161 Wednesday, May 22, 13

Slide 715

Slide 715 text

Scratch that Sqitch Screwed either way? Fortunately, this is Git Tell it to treat Sqitch plans differently antisocial network 161 Wednesday, May 22, 13

Slide 716

Slide 716 text

Scratch that Sqitch Screwed either way? Fortunately, this is Git Tell it to treat Sqitch plans differently Changes on single lines antisocial network 161 Wednesday, May 22, 13

Slide 717

Slide 717 text

Scratch that Sqitch Screwed either way? Fortunately, this is Git Tell it to treat Sqitch plans differently Changes on single lines Only appended to plan file antisocial network 161 Wednesday, May 22, 13

Slide 718

Slide 718 text

Scratch that Sqitch Screwed either way? Fortunately, this is Git Tell it to treat Sqitch plans differently Changes on single lines Only appended to plan file Use the “union” merge antisocial network 161 Wednesday, May 22, 13

Slide 719

Slide 719 text

Re: Union Merge 162 Wednesday, May 22, 13

Slide 720

Slide 720 text

Re: Union Merge Run 3-way file level merge for text files, but take lines from both versions, instead of leaving conflict markers. This tends to leave the added lines in the resulting file in random order and the user should verify the result. Do not use this if you do not understand the implications. —Git Manual 162 Wednesday, May 22, 13

Slide 721

Slide 721 text

Hallelunion antisocial network 163 Wednesday, May 22, 13

Slide 722

Slide 722 text

Hallelunion Just appends lines antisocial network 163 Wednesday, May 22, 13

Slide 723

Slide 723 text

Hallelunion Just appends lines Exactly how changes work antisocial network 163 Wednesday, May 22, 13

Slide 724

Slide 724 text

Hallelunion Just appends lines Exactly how changes work Let’s clean up our mess antisocial network 163 Wednesday, May 22, 13

Slide 725

Slide 725 text

Hallelunion Just appends lines Exactly how changes work Let’s clean up our mess And try again antisocial network 163 Wednesday, May 22, 13

Slide 726

Slide 726 text

Reemerge > 164 Wednesday, May 22, 13

Slide 727

Slide 727 text

""git"rebase"**abort > Reemerge > 164 Wednesday, May 22, 13

Slide 728

Slide 728 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"**abort > Reemerge > 164 Wednesday, May 22, 13

Slide 729

Slide 729 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > 164 Wednesday, May 22, 13

Slide 730

Slide 730 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > Back to B, applies C 164 Wednesday, May 22, 13

Slide 731

Slide 731 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > That’s D 164 Wednesday, May 22, 13

Slide 732

Slide 732 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > Union merge 164 Wednesday, May 22, 13

Slide 733

Slide 733 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > That’s E 164 Wednesday, May 22, 13

Slide 734

Slide 734 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > Union merge 164 Wednesday, May 22, 13

Slide 735

Slide 735 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > Success! 164 Wednesday, May 22, 13

Slide 736

Slide 736 text

""echo"sqitch.plan"merge=union">".gitattributes > ""git"rebase"master First,"rewinding"head"to"replay"your"work"on"top"of"it... Applying:"Add"`insert_user()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan Applying:"Add"`change_pass()`. Using"index"info"to"reconstruct"a"base"tree... M" sqitch.plan Falling"back"to"patching"base"and"3*way"merge... Auto*merging"sqitch.plan > ""git"rebase"**abort > Reemerge > ""emacs"sqitch.plan > Success! 164 Wednesday, May 22, 13

Slide 737

Slide 737 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 738

Slide 738 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 739

Slide 739 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 740

Slide 740 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 741

Slide 741 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 742

Slide 742 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to 165 Wednesday, May 22, 13

Slide 743

Slide 743 text

sqitch.plan What’s the Plan, Man? %syntax*version=1.0.0*b2 %project=flipr %uri=file://../flipr*remote appschema"2013*05*21T19:01:04Z"David"E."Wheeler" "#"Adds"flipr"app"schema. users"[appschema]"2013*05*21T19:41:54Z"David"E."Wheeler" "#"Creates"table"to"track"our" users. flips"[appschema"users]"2013*05*21T20:38:21Z"David"E." Wheeler""#"Adds"table"for"storing" flips. insert_user"[users"appschema]"2013*05*21T20:51:05Z"David" E."Wheeler""#"Creates"a"function"to" insert"a"user. change_pass"[users"appschema]"2013*05*21T21:05:42Z"David" E."Wheeler""#"Creates"a"function"to Perfect 165 Wednesday, May 22, 13

Slide 744

Slide 744 text

Work It > 166 Wednesday, May 22, 13

Slide 745

Slide 745 text

>"sqitch"rebase"*y Reverting"all"changes"from"flipr_test ""*"change_pass".."ok ""*"insert_user".."ok ""*"users"........"ok ""*"appschema"...."ok Deploying"changes"to"flipr_test ""+"appschema"...."ok ""+"users"........"ok ""+"flips"........"ok ""+"insert_user".."ok ""+"change_pass".."ok > Work It > 166 Wednesday, May 22, 13

Slide 746

Slide 746 text

>"sqitch"rebase"*y Reverting"all"changes"from"flipr_test ""*"change_pass".."ok ""*"insert_user".."ok ""*"users"........"ok ""*"appschema"...."ok Deploying"changes"to"flipr_test ""+"appschema"...."ok ""+"users"........"ok ""+"flips"........"ok ""+"insert_user".."ok ""+"change_pass".."ok > Work It > { 166 Wednesday, May 22, 13

Slide 747

Slide 747 text

>"sqitch"rebase"*y Reverting"all"changes"from"flipr_test ""*"change_pass".."ok ""*"insert_user".."ok ""*"users"........"ok ""*"appschema"...."ok Deploying"changes"to"flipr_test ""+"appschema"...."ok ""+"users"........"ok ""+"flips"........"ok ""+"insert_user".."ok ""+"change_pass".."ok > Work It > { { 166 Wednesday, May 22, 13

Slide 748

Slide 748 text

>"sqitch"rebase"*y Reverting"all"changes"from"flipr_test ""*"change_pass".."ok ""*"insert_user".."ok ""*"users"........"ok ""*"appschema"...."ok Deploying"changes"to"flipr_test ""+"appschema"...."ok ""+"users"........"ok ""+"flips"........"ok ""+"insert_user".."ok ""+"change_pass".."ok > Work It > { { Awesomsauce 166 Wednesday, May 22, 13

Slide 749

Slide 749 text

Make it So > 167 Wednesday, May 22, 13

Slide 750

Slide 750 text

>"git"add". > Make it So > 167 Wednesday, May 22, 13

Slide 751

Slide 751 text

>"git"add". > ""git"commit"*m"'Use"union"merge"for"`sqitch.plan`.' [userfuncs"0e31da9]"Use"union"merge"for"`sqitch.plan`. "1"file"changed,"1"insertion(+) "create"mode"100644".gitattributes > Make it So > 167 Wednesday, May 22, 13

Slide 752

Slide 752 text

>"git"add". > ""git"commit"*m"'Use"union"merge"for"`sqitch.plan`.' [userfuncs"0e31da9]"Use"union"merge"for"`sqitch.plan`. "1"file"changed,"1"insertion(+) "create"mode"100644".gitattributes > ""git"push"**force"origin"userfuncs Counting"objects:"31,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(24/24),"done. Writing"objects:"100%"(25/25),"3.83"KiB,"done. Total"25"(delta"7),"reused"0"(delta"0) To"../flipr*remote "+"e7477c...0e31da"userfuncs"*>"userfuncs"(forced"update > Make it So > Overwrite history 167 Wednesday, May 22, 13

Slide 753

Slide 753 text

>"git"add". > ""git"commit"*m"'Use"union"merge"for"`sqitch.plan`.' [userfuncs"0e31da9]"Use"union"merge"for"`sqitch.plan`. "1"file"changed,"1"insertion(+) "create"mode"100644".gitattributes > ""git"push"**force"origin"userfuncs Counting"objects:"31,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(24/24),"done. Writing"objects:"100%"(25/25),"3.83"KiB,"done. Total"25"(delta"7),"reused"0"(delta"0) To"../flipr*remote "+"e7477c...0e31da"userfuncs"*>"userfuncs"(forced"update > Make it So > 167 Wednesday, May 22, 13

Slide 754

Slide 754 text

> 168 Wednesday, May 22, 13

Slide 755

Slide 755 text

>"git"checkout"master Switched"to"branch"'master' > > 168 Wednesday, May 22, 13

Slide 756

Slide 756 text

""git"merge"userfuncs Updating"fbf8469..0e31da9 Fast*forward ".gitattributes"""""""""|""1"+ "deploy/change_pass.sql"|"21"++++++++++++++++++ "deploy/insert_user.sql"|"14"++++++++++++ "revert/change_pass.sql"|""7"++++++ "revert/insert_user.sql"|""7"++++++ "sqitch.plan""""""""""""|""2"++ "test/change_pass.sql"""|"52"++++++++++++++++++++++++++++++++++ "test/insert_user.sql"""|"69"++++++++++++++++++++++++++++++++++ "verify/change_pass.sql"|""7"++++++ "verify/insert_user.sql"|"10"+++++++++ "10"files"changed,"190"insertions(+) "create"mode"100644".gitattributes "create"mode"100644"deploy/change_pass.sql "create"mode"100644"deploy/insert_user.sql "create"mode"100644"revert/change_pass.sql "create"mode"100644"revert/insert_user.sql "create"mode"100644"test/change_pass.sql "create"mode"100644"test/insert_user.sql "create"mode"100644"verify/change_pass.sql "create"mode"100644"verify/insert_user.sql > >"git"checkout"master Switched"to"branch"'master' > > 168 Wednesday, May 22, 13

Slide 757

Slide 757 text

""git"merge"userfuncs Updating"fbf8469..0e31da9 Fast*forward ".gitattributes"""""""""|""1"+ "deploy/change_pass.sql"|"21"++++++++++++++++++ "deploy/insert_user.sql"|"14"++++++++++++ "revert/change_pass.sql"|""7"++++++ "revert/insert_user.sql"|""7"++++++ "sqitch.plan""""""""""""|""2"++ "test/change_pass.sql"""|"52"++++++++++++++++++++++++++++++++++ "test/insert_user.sql"""|"69"++++++++++++++++++++++++++++++++++ "verify/change_pass.sql"|""7"++++++ "verify/insert_user.sql"|"10"+++++++++ "10"files"changed,"190"insertions(+) "create"mode"100644".gitattributes "create"mode"100644"deploy/change_pass.sql "create"mode"100644"deploy/insert_user.sql "create"mode"100644"revert/change_pass.sql "create"mode"100644"revert/insert_user.sql "create"mode"100644"test/change_pass.sql "create"mode"100644"test/insert_user.sql "create"mode"100644"verify/change_pass.sql "create"mode"100644"verify/insert_user.sql > >"git"checkout"master Switched"to"branch"'master' > > \O/ 168 Wednesday, May 22, 13

Slide 758

Slide 758 text

Pusher > 169 Wednesday, May 22, 13

Slide 759

Slide 759 text

""git"push Counting"objects:"20,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(13/13),"done. Writing"objects:"100%"(14/14),"2.31"KiB,"done. Total"14"(delta"2),"reused"0"(delta"0) To"../flipr*remote """fbf8469..0e31da9""master"*>"master > Pusher > 169 Wednesday, May 22, 13

Slide 760

Slide 760 text

antisocial network 170 Wednesday, May 22, 13

Slide 761

Slide 761 text

Ship it! antisocial network 170 Wednesday, May 22, 13

Slide 762

Slide 762 text

Ship Shape antisocial network 171 Wednesday, May 22, 13

Slide 763

Slide 763 text

Ship Shape Good work so far antisocial network 171 Wednesday, May 22, 13

Slide 764

Slide 764 text

Ship Shape Good work so far People gonna flip out antisocial network 171 Wednesday, May 22, 13

Slide 765

Slide 765 text

Ship Shape Good work so far People gonna flip out Let’s tag a dev release antisocial network 171 Wednesday, May 22, 13

Slide 766

Slide 766 text

Ship Shape Good work so far People gonna flip out Let’s tag a dev release Bundle it up antisocial network 171 Wednesday, May 22, 13

Slide 767

Slide 767 text

Ship Shape Good work so far People gonna flip out Let’s tag a dev release Bundle it up And ship it antisocial network 171 Wednesday, May 22, 13

Slide 768

Slide 768 text

You’re It > 172 Wednesday, May 22, 13

Slide 769

Slide 769 text

""sqitch"tag"v1.0.0*r1"*n"'Tag"v1.0.0*r1.' Tagged""change_pass""with"@v1.0.0*r1 > You’re It > 172 Wednesday, May 22, 13

Slide 770

Slide 770 text

""sqitch"tag"v1.0.0*r1"*n"'Tag"v1.0.0*r1.' Tagged""change_pass""with"@v1.0.0*r1 > ""git"commit"*am"'Tag"the"database"@v1.0.0*r1.'""" [master"6661268]"Tag"the"database"@v1.0.0*r1. "1"file"changed,"1"insertion(+) > You’re It > 172 Wednesday, May 22, 13

Slide 771

Slide 771 text

""git"tag"v1.0.0*r1"*am"'Tag"v1.0.0*r1.' > ""sqitch"tag"v1.0.0*r1"*n"'Tag"v1.0.0*r1.' Tagged""change_pass""with"@v1.0.0*r1 > ""git"commit"*am"'Tag"the"database"@v1.0.0*r1.'""" [master"6661268]"Tag"the"database"@v1.0.0*r1. "1"file"changed,"1"insertion(+) > You’re It > In sync. In sync. 172 Wednesday, May 22, 13

Slide 772

Slide 772 text

""git"tag"v1.0.0*r1"*am"'Tag"v1.0.0*r1.' > ""sqitch"tag"v1.0.0*r1"*n"'Tag"v1.0.0*r1.' Tagged""change_pass""with"@v1.0.0*r1 > ""git"commit"*am"'Tag"the"database"@v1.0.0*r1.'""" [master"6661268]"Tag"the"database"@v1.0.0*r1. "1"file"changed,"1"insertion(+) > ""git"push Counting"objects:"5,"done. Writing"objects:"100%"(3/3),"346"bytes,"done. Total"3"(delta"2),"reused"0"(delta"0) To"../flipr*remote """0e31da9..6661268""master"*>"master > You’re It > 172 Wednesday, May 22, 13

Slide 773

Slide 773 text

""git"tag"v1.0.0*r1"*am"'Tag"v1.0.0*r1.' > ""sqitch"tag"v1.0.0*r1"*n"'Tag"v1.0.0*r1.' Tagged""change_pass""with"@v1.0.0*r1 > ""git"commit"*am"'Tag"the"database"@v1.0.0*r1.'""" [master"6661268]"Tag"the"database"@v1.0.0*r1. "1"file"changed,"1"insertion(+) > ""git"push Counting"objects:"5,"done. Writing"objects:"100%"(3/3),"346"bytes,"done. Total"3"(delta"2),"reused"0"(delta"0) To"../flipr*remote """0e31da9..6661268""master"*>"master > ""git"push"**tags To"../flipr*remote "*"[new"tag]"""""""""v1.0.0*r1"*>"v1.0.0*r1 > You’re It > 172 Wednesday, May 22, 13

Slide 774

Slide 774 text

Bundle Up > 173 Wednesday, May 22, 13

Slide 775

Slide 775 text

""sqitch"bundle"**dest*dir"flipr*1.0.0*r1 Bundling"into"flipr*1.0.0*r1 Writing"config Writing"plan Writing"scripts ""+"appschema ""+"users ""+"flips ""+"insert_user ""+"change_pass"@v1.0.0*r1 > Bundle Up > 173 Wednesday, May 22, 13

Slide 776

Slide 776 text

""sqitch"bundle"**dest*dir"flipr*1.0.0*r1 Bundling"into"flipr*1.0.0*r1 Writing"config Writing"plan Writing"scripts ""+"appschema ""+"users ""+"flips ""+"insert_user ""+"change_pass"@v1.0.0*r1 > Bundle Up > { 173 Wednesday, May 22, 13

Slide 777

Slide 777 text

Bundled? > 174 Wednesday, May 22, 13

Slide 778

Slide 778 text

>"cd"flipr*1.0.0*r1 > Bundled? > 174 Wednesday, May 22, 13

Slide 779

Slide 779 text

""createdb"flipr_qa" > >"cd"flipr*1.0.0*r1 > Bundled? > 174 Wednesday, May 22, 13

Slide 780

Slide 780 text

""createdb"flipr_qa" > >"cd"flipr*1.0.0*r1 > Bundled? > ""sqitch"*d"flipr_qa"deploy Adding"metadata"tables"to"flipr_qa Deploying"changes"to"flipr_qa ""+"appschema"..............."ok ""+"users"..................."ok ""+"flips"..................."ok ""+"insert_user"@v1.0.0*r1".."ok > 174 Wednesday, May 22, 13

Slide 781

Slide 781 text

""createdb"flipr_qa" > >"cd"flipr*1.0.0*r1 > Bundled? > Ship it! ""sqitch"*d"flipr_qa"deploy Adding"metadata"tables"to"flipr_qa Deploying"changes"to"flipr_qa ""+"appschema"..............."ok ""+"users"..................."ok ""+"flips"..................."ok ""+"insert_user"@v1.0.0*r1".."ok > 174 Wednesday, May 22, 13

Slide 782

Slide 782 text

antisocial network Merge Madness 175 Wednesday, May 22, 13

Slide 783

Slide 783 text

antisocial network Merge Madness Merge everything 175 Wednesday, May 22, 13

Slide 784

Slide 784 text

antisocial network Merge Madness Merge everything Back to master 175 Wednesday, May 22, 13

Slide 785

Slide 785 text

antisocial network Merge Madness Merge everything Back to master users 175 Wednesday, May 22, 13

Slide 786

Slide 786 text

antisocial network Merge Madness Merge everything Back to master users flips 175 Wednesday, May 22, 13

Slide 787

Slide 787 text

antisocial network Merge Madness Merge everything Back to master users flips userfuncs 175 Wednesday, May 22, 13

Slide 788

Slide 788 text

antisocial network Merge Madness Merge everything Back to master users flips userfuncs Union merge sqitch.plan 175 Wednesday, May 22, 13

Slide 789

Slide 789 text

antisocial network Merge Madness Merge everything Back to master users flips userfuncs Union merge sqitch.plan Bundle and ship 175 Wednesday, May 22, 13

Slide 790

Slide 790 text

antisocial network Merge Madness Merge everything Back to master users flips userfuncs Union merge sqitch.plan Bundle and ship https:/ /github.com/ theory/agile-flipr.git 175 Wednesday, May 22, 13

Slide 791

Slide 791 text

Ruh-Roh > 176 Wednesday, May 22, 13

Slide 792

Slide 792 text

Ruh-Roh > >"git"reset"**hard"reltag HEAD"is"now"at"6661268"Tag"the"database"@v1.0.0*r1. > 176 Wednesday, May 22, 13

Slide 793

Slide 793 text

""psql"*d"flipr_test"*c"" """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|"""""""""""""password""""""""""""" **********+********************************** "foo""""""|"9695da4dd567a19f9b92065f240c6725 "bar""""""|"9695da4dd567a19f9b92065f240c6725 (2"rows) > Ruh-Roh > >"git"reset"**hard"reltag HEAD"is"now"at"6661268"Tag"the"database"@v1.0.0*r1. > Same password 176 Wednesday, May 22, 13

Slide 794

Slide 794 text

""psql"*d"flipr_test"*c"" """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|"""""""""""""password""""""""""""" **********+********************************** "foo""""""|"9695da4dd567a19f9b92065f240c6725 "bar""""""|"9695da4dd567a19f9b92065f240c6725 (2"rows) > Ruh-Roh > >"git"reset"**hard"reltag HEAD"is"now"at"6661268"Tag"the"database"@v1.0.0*r1. > 176 Wednesday, May 22, 13

Slide 795

Slide 795 text

""psql"*d"flipr_test"*c"" """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|"""""""""""""password""""""""""""" **********+********************************** "foo""""""|"9695da4dd567a19f9b92065f240c6725 "bar""""""|"9695da4dd567a19f9b92065f240c6725 (2"rows) > Ruh-Roh > Not good. >"git"reset"**hard"reltag HEAD"is"now"at"6661268"Tag"the"database"@v1.0.0*r1. > 176 Wednesday, May 22, 13

Slide 796

Slide 796 text

PGCryptonite > 177 Wednesday, May 22, 13

Slide 797

Slide 797 text

""sqitch"add"pgcrypto"*n"'Loads"pgcrypto"extension.' Adding"deploy/pgcrypto.sql Adding"revert/pgcrypto.sql Adding"verify/pgcrypto.sql Added""pgcrypto""to"sqitch.plan > PGCryptonite > 177 Wednesday, May 22, 13

Slide 798

Slide 798 text

""sqitch"add"pgcrypto"*n"'Loads"pgcrypto"extension.' Adding"deploy/pgcrypto.sql Adding"revert/pgcrypto.sql Adding"verify/pgcrypto.sql Added""pgcrypto""to"sqitch.plan > PGCryptonite > ""emacs"deploy/pgcrpyto.sql > 177 Wednesday, May 22, 13

Slide 799

Slide 799 text

deploy/pgcrypto deploy/pgcrypto.sql **"Deploy"pgcrypto BEGIN; COMMIT; **"XXX"Add"DDLs"here. 178 Wednesday, May 22, 13

Slide 800

Slide 800 text

deploy/pgcrypto deploy/pgcrypto.sql **"Deploy"pgcrypto BEGIN; COMMIT; CREATE"EXTENSION"pgcrypto; 178 Wednesday, May 22, 13

Slide 801

Slide 801 text

""sqitch"add"pgcrypto"*n"'Loads"pgcrypto"extension.' Adding"deploy/pgcrypto.sql Adding"revert/pgcrypto.sql Adding"verify/pgcrypto.sql Added""pgcrypto""to"sqitch.plan >"emacs"deploy/pgcrpyto.sql > PGCryptonite > 179 Wednesday, May 22, 13

Slide 802

Slide 802 text

""sqitch"add"pgcrypto"*n"'Loads"pgcrypto"extension.' Adding"deploy/pgcrypto.sql Adding"revert/pgcrypto.sql Adding"verify/pgcrypto.sql Added""pgcrypto""to"sqitch.plan >"emacs"deploy/pgcrpyto.sql > PGCryptonite > ""emacs"verify/pgcrpyto.sql > 179 Wednesday, May 22, 13

Slide 803

Slide 803 text

**"Verify"pgcrypto BEGIN; verify/pgcrypto verify/pgcrypto.sql **"XXX"Add"verifications"here. COMMIT; 180 Wednesday, May 22, 13

Slide 804

Slide 804 text

**"Verify"pgcrypto BEGIN; verify/pgcrypto verify/pgcrypto.sql COMMIT; SELECT"1/count(*)"FROM"pg_extension"WHERE"extname"="'pgcrypto'; SELECT"has_function_privilege('crypt(text,"text)',"'execute'); SELECT"has_function_privilege('gen_salt(text)',"'execute'); 180 Wednesday, May 22, 13

Slide 805

Slide 805 text

**"Verify"pgcrypto BEGIN; verify/pgcrypto verify/pgcrypto.sql COMMIT; SELECT"1/count(*)"FROM"pg_extension"WHERE"extname"="'pgcrypto'; SELECT"has_function_privilege('crypt(text,"text)',"'execute'); SELECT"has_function_privilege('gen_salt(text)',"'execute'); 180 Wednesday, May 22, 13

Slide 806

Slide 806 text

**"Verify"pgcrypto BEGIN; verify/pgcrypto verify/pgcrypto.sql COMMIT; SELECT"1/count(*)"FROM"pg_extension"WHERE"extname"="'pgcrypto'; SELECT"has_function_privilege('crypt(text,"text)',"'execute'); SELECT"has_function_privilege('gen_salt(text)',"'execute'); 180 Wednesday, May 22, 13

Slide 807

Slide 807 text

You Know the Drill antisocial network 181 Wednesday, May 22, 13

Slide 808

Slide 808 text

You Know the Drill Write revert script antisocial network 181 Wednesday, May 22, 13

Slide 809

Slide 809 text

You Know the Drill Write revert script Add test antisocial network 181 Wednesday, May 22, 13

Slide 810

Slide 810 text

You Know the Drill Write revert script Add test Use has_function() antisocial network 181 Wednesday, May 22, 13

Slide 811

Slide 811 text

You Know the Drill Write revert script Add test Use has_function() Commit antisocial network 181 Wednesday, May 22, 13

Slide 812

Slide 812 text

You Know the Drill Write revert script Add test Use has_function() Commit Push antisocial network 181 Wednesday, May 22, 13

Slide 813

Slide 813 text

You Know the Drill Write revert script Add test Use has_function() Commit Push Modify the insert_user test antisocial network 181 Wednesday, May 22, 13

Slide 814

Slide 814 text

> 182 Wednesday, May 22, 13

Slide 815

Slide 815 text

""git"diff"test/insert_user.sql @@"*5,7"+5,7"@@"SET"search_path"TO"flipr,public; " "**"Plan"the"tests. "BEGIN; *SELECT"plan(11); +SELECT"plan(12); " "SELECT"has_function("'insert_user'"); "SELECT"has_function( @@"*29,25"+29,25"@@"SELECT"lives_ok( """""'Insert"a"user' "); " *SELECT"row_eq( *"""'SELECT"*"FROM"users', *"""ROW('theory',"md5('foo'),"NOW())::users, *"""'The"user"should"have"been"inserted' *); +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'theory' +"""""""AND"password"="crypt('foo',"password) +),"'The"user"should"have"been"inserted'"); > 182 Wednesday, May 22, 13

Slide 816

Slide 816 text

""git"diff"test/insert_user.sql @@"*5,7"+5,7"@@"SET"search_path"TO"flipr,public; " "**"Plan"the"tests. "BEGIN; *SELECT"plan(11); +SELECT"plan(12); " "SELECT"has_function("'insert_user'"); "SELECT"has_function( @@"*29,25"+29,25"@@"SELECT"lives_ok( """""'Insert"a"user' "); " *SELECT"row_eq( *"""'SELECT"*"FROM"users', *"""ROW('theory',"md5('foo'),"NOW())::users, *"""'The"user"should"have"been"inserted' *); +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'theory' +"""""""AND"password"="crypt('foo',"password) +),"'The"user"should"have"been"inserted'"); > 182 Wednesday, May 22, 13

Slide 817

Slide 817 text

""git"diff"test/insert_user.sql @@"*5,7"+5,7"@@"SET"search_path"TO"flipr,public; " "**"Plan"the"tests. "BEGIN; *SELECT"plan(11); +SELECT"plan(12); " "SELECT"has_function("'insert_user'"); "SELECT"has_function( @@"*29,25"+29,25"@@"SELECT"lives_ok( """""'Insert"a"user' "); " *SELECT"row_eq( *"""'SELECT"*"FROM"users', *"""ROW('theory',"md5('foo'),"NOW())::users, *"""'The"user"should"have"been"inserted' *); +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'theory' +"""""""AND"password"="crypt('foo',"password) +),"'The"user"should"have"been"inserted'"); > 182 Wednesday, May 22, 13

Slide 818

Slide 818 text

"SELECT"lives_ok( """""$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """""'Insert"another"user' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Both"users"should"be"present' *); +SELECT"is(COUNT(*)::INT,"2,"'There"should"be"two"users') +""FROM"flipr.users; + +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'strongrrl' +"""""""AND"password"="crypt('w00t',"password) +),"'The"second"user"should"have"been"inserted'"); "SELECT"throws_ok( """""$$"SELECT"insert_user('theory',"'ha*ha')"$$, 183 Wednesday, May 22, 13

Slide 819

Slide 819 text

"SELECT"lives_ok( """""$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """""'Insert"another"user' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Both"users"should"be"present' *); +SELECT"is(COUNT(*)::INT,"2,"'There"should"be"two"users') +""FROM"flipr.users; + +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'strongrrl' +"""""""AND"password"="crypt('w00t',"password) +),"'The"second"user"should"have"been"inserted'"); "SELECT"throws_ok( """""$$"SELECT"insert_user('theory',"'ha*ha')"$$, 183 Wednesday, May 22, 13

Slide 820

Slide 820 text

"SELECT"lives_ok( """""$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """""'Insert"another"user' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Both"users"should"be"present' *); +SELECT"is(COUNT(*)::INT,"2,"'There"should"be"two"users') +""FROM"flipr.users; + +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'strongrrl' +"""""""AND"password"="crypt('w00t',"password) +),"'The"second"user"should"have"been"inserted'"); "SELECT"throws_ok( """""$$"SELECT"insert_user('theory',"'ha*ha')"$$, 183 Wednesday, May 22, 13

Slide 821

Slide 821 text

"SELECT"lives_ok( """""$$"SELECT"insert_user('strongrrl',"'w00t')"$$, """""'Insert"another"user' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Both"users"should"be"present' *); +SELECT"is(COUNT(*)::INT,"2,"'There"should"be"two"users') +""FROM"flipr.users; + +SELECT"ok("EXISTS( +""""SELECT"1"FROM"flipr.users +"""""WHERE"nickname"="'strongrrl' +"""""""AND"password"="crypt('w00t',"password) +),"'The"second"user"should"have"been"inserted'"); "SELECT"throws_ok( """""$$"SELECT"insert_user('theory',"'ha*ha')"$$, 183 Wednesday, May 22, 13

Slide 822

Slide 822 text

@@"*56,14"+56,8"@@"SELECT"throws_ok( """""'Should"get"an"error"for"duplicate"nickname' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Should"still"have"just"the"two"users' *); +SELECT"is(COUNT(*)::INT,"2,"'Should"still"have"two"users') +""FROM"flipr.users; " "SELECT"finish(); "ROLLBACK; > 184 Wednesday, May 22, 13

Slide 823

Slide 823 text

@@"*56,14"+56,8"@@"SELECT"throws_ok( """""'Should"get"an"error"for"duplicate"nickname' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Should"still"have"just"the"two"users' *); +SELECT"is(COUNT(*)::INT,"2,"'Should"still"have"two"users') +""FROM"flipr.users; " "SELECT"finish(); "ROLLBACK; > 184 Wednesday, May 22, 13

Slide 824

Slide 824 text

@@"*56,14"+56,8"@@"SELECT"throws_ok( """""'Should"get"an"error"for"duplicate"nickname' "); " *SELECT"bag_eq( *""""'SELECT"*"FROM"users', *""""$$"VALUES *""""""""('theory',""""md5('foo'),""NOW()), *""""""""('strongrrl',"md5('w00t'),"NOW()) *""""$$, *""""'Should"still"have"just"the"two"users' *); +SELECT"is(COUNT(*)::INT,"2,"'Should"still"have"two"users') +""FROM"flipr.users; " "SELECT"finish(); "ROLLBACK; > 184 Wednesday, May 22, 13

Slide 825

Slide 825 text

FAIL > 185 Wednesday, May 22, 13

Slide 826

Slide 826 text

FAIL >"pg_prove"*d"flipr_test"test/insert_user.sql test/insert_user.sql".."1/12" #"Failed"test"7:""The"user"should"have"been"inserted" #"Failed"test"10:""The"second"user"should"have"been"inserted" #"Looks"like"you"failed"2"tests"of"12 test/insert_user.sql".."Failed"2/12"subtests" Test"Summary"Report ******************* test/insert_user.sql"(Wstat:"0"Tests:"12"Failed:"2) ""Failed"tests:""7,"10 Files=1,"Tests=12,""1"wallclock"secs Result:"FAIL > > 185 Wednesday, May 22, 13

Slide 827

Slide 827 text

FAIL >"pg_prove"*d"flipr_test"test/insert_user.sql test/insert_user.sql".."1/12" #"Failed"test"7:""The"user"should"have"been"inserted" #"Failed"test"10:""The"second"user"should"have"been"inserted" #"Looks"like"you"failed"2"tests"of"12 test/insert_user.sql".."Failed"2/12"subtests" Test"Summary"Report ******************* test/insert_user.sql"(Wstat:"0"Tests:"12"Failed:"2) ""Failed"tests:""7,"10 Files=1,"Tests=12,""1"wallclock"secs Result:"FAIL > > As expected. 185 Wednesday, May 22, 13

Slide 828

Slide 828 text

Back when discussing traditional migration systems, I said… antisocial network 186 Wednesday, May 22, 13

Slide 829

Slide 829 text

Managing procedures is a PITA! antisocial network 187 Wednesday, May 22, 13

Slide 830

Slide 830 text

Consider this Change > 188 Wednesday, May 22, 13

Slide 831

Slide 831 text

Consider this Change ""git"diff diff"**git"a/deploy/insert_user.sql"b/deploy/insert_user.sql index"eb30fed..5c28d02"100644 ***"a/deploy/insert_user.sql +++"b/deploy/insert_user.sql @@"*8,7"+8,7"@@"CREATE"OR"REPLACE"FUNCTION"flipr.insert_user( """""nickname"TEXT, """""password"TEXT ")"RETURNS"VOID"LANGUAGE"SQL"SECURITY"DEFINER"AS"$$ *""""INSERT"INTO"flipr.users"VALUES($1,"md5($2)); +""""INSERT"INTO"flipr.users"values($1,"crypt($2,"gen_salt('md5'))); "$$; " "COMMIT; > 188 Wednesday, May 22, 13

Slide 832

Slide 832 text

Consider this Change ""git"diff diff"**git"a/deploy/insert_user.sql"b/deploy/insert_user.sql index"eb30fed..5c28d02"100644 ***"a/deploy/insert_user.sql +++"b/deploy/insert_user.sql @@"*8,7"+8,7"@@"CREATE"OR"REPLACE"FUNCTION"flipr.insert_user( """""nickname"TEXT, """""password"TEXT ")"RETURNS"VOID"LANGUAGE"SQL"SECURITY"DEFINER"AS"$$ *""""INSERT"INTO"flipr.users"VALUES($1,"md5($2)); +""""INSERT"INTO"flipr.users"values($1,"crypt($2,"gen_salt('md5'))); "$$; " "COMMIT; > Simple, right? 188 Wednesday, May 22, 13

Slide 833

Slide 833 text

Not So Much antisocial network 189 Wednesday, May 22, 13

Slide 834

Slide 834 text

Not So Much Copy insert_user.sql to new deploy file antisocial network 189 Wednesday, May 22, 13

Slide 835

Slide 835 text

Not So Much Copy insert_user.sql to new deploy file Change that new file antisocial network 189 Wednesday, May 22, 13

Slide 836

Slide 836 text

Not So Much Copy insert_user.sql to new deploy file Change that new file Copy insert_user.sql to new revert file antisocial network 189 Wednesday, May 22, 13

Slide 837

Slide 837 text

Not So Much Copy insert_user.sql to new deploy file Change that new file Copy insert_user.sql to new revert file Test it antisocial network 189 Wednesday, May 22, 13

Slide 838

Slide 838 text

Not So Much Copy insert_user.sql to new deploy file Change that new file Copy insert_user.sql to new revert file Test it Do the same for change_pass.sql antisocial network 189 Wednesday, May 22, 13

Slide 839

Slide 839 text

Not So Much Copy insert_user.sql to new deploy file Change that new file Copy insert_user.sql to new revert file Test it Do the same for change_pass.sql The problem with that… antisocial network 189 Wednesday, May 22, 13

Slide 840

Slide 840 text

> 190 Wednesday, May 22, 13

Slide 841

Slide 841 text

>"git"diff"HEAD^ diff"**git"a/deploy/insert_user_crypt.sql"b/deploy/insert_user_crypto.sql new"file"mode"100644 index"0000000..fa8d0c6 ***"/dev/null +++"b/deploy/insert_user_crypt.sql @@"*0,0"+1,8"@@ +**"requires:"users,"appuser,"pgcrypto + +CREATE"OR"REPLACE"FUNCTION"insert_user( +""""nickname"TEXT, +""""password"TEXT +)"RETURNS"VOID"LANGUAGE"SQL"AS"$$ +""""INSERT"INTO"users"values($1,"crypt($2,"gen_salt('md5'))); +$$; diff"**git"a/revert/insert_user_crypt.sql"b/revert/insert_user_crypto.sql new"file"mode"100644 index"0000000..a7f4e31 ***"/dev/null +++"b/revert/insert_user_crypt.sql @@"*0,0"+1,8"@@ +**"requires:"users,"appuser + +CREATE"OR"REPLACE"FUNCTION"insert_user( +""""nickname"TEXT, +""""password"TEXT +)"RETURNS"VOID"LANGUAGE"SQL"AS"$$ +""""INSERT"INTO"users"values($1,"md5($2)); +$$; > 190 Wednesday, May 22, 13

Slide 842

Slide 842 text

>"git"diff"HEAD^ diff"**git"a/deploy/insert_user_crypt.sql"b/deploy/insert_user_crypto.sql new"file"mode"100644 index"0000000..fa8d0c6 ***"/dev/null +++"b/deploy/insert_user_crypt.sql @@"*0,0"+1,8"@@ +**"requires:"users,"appuser,"pgcrypto + +CREATE"OR"REPLACE"FUNCTION"insert_user( +""""nickname"TEXT, +""""password"TEXT +)"RETURNS"VOID"LANGUAGE"SQL"AS"$$ +""""INSERT"INTO"users"values($1,"crypt($2,"gen_salt('md5'))); +$$; diff"**git"a/revert/insert_user_crypt.sql"b/revert/insert_user_crypto.sql new"file"mode"100644 index"0000000..a7f4e31 ***"/dev/null +++"b/revert/insert_user_crypt.sql @@"*0,0"+1,8"@@ +**"requires:"users,"appuser + +CREATE"OR"REPLACE"FUNCTION"insert_user( +""""nickname"TEXT, +""""password"TEXT +)"RETURNS"VOID"LANGUAGE"SQL"AS"$$ +""""INSERT"INTO"users"values($1,"md5($2)); +$$; > Oy. 190 Wednesday, May 22, 13

Slide 843

Slide 843 text

Let Sqitch do the work. antisocial network 191 Wednesday, May 22, 13

Slide 844

Slide 844 text

Rework It > 192 Wednesday, May 22, 13

Slide 845

Slide 845 text

""sqitch"rework"insert_user"*r"pgcrypto"\ ""*n"'Changes"insert_user"to"use"pgcrypto.' Added""insert_user"[[email protected]*r1"pgcrypto]""to" sqitch.plan. Modify"these"files"as"appropriate: ""*"deploy/insert_user.sql ""*"revert/insert_user.sql ""*"verify/insert_user.sql > Rework It > 192 Wednesday, May 22, 13

Slide 846

Slide 846 text

""sqitch"rework"insert_user"*r"pgcrypto"\ ""*n"'Changes"insert_user"to"use"pgcrypto.' Added""insert_user"[[email protected]*r1"pgcrypto]""to" sqitch.plan. Modify"these"files"as"appropriate: ""*"deploy/insert_user.sql ""*"revert/insert_user.sql ""*"verify/insert_user.sql > Rework It > 192 Wednesday, May 22, 13

Slide 847

Slide 847 text

""sqitch"rework"insert_user"*r"pgcrypto"\ ""*n"'Changes"insert_user"to"use"pgcrypto.' Added""insert_user"[[email protected]*r1"pgcrypto]""to" sqitch.plan. Modify"these"files"as"appropriate: ""*"deploy/insert_user.sql ""*"revert/insert_user.sql ""*"verify/insert_user.sql > Rework It > 192 Wednesday, May 22, 13

Slide 848

Slide 848 text

""sqitch"rework"insert_user"*r"pgcrypto"\ ""*n"'Changes"insert_user"to"use"pgcrypto.' Added""insert_user"[[email protected]*r1"pgcrypto]""to" sqitch.plan. Modify"these"files"as"appropriate: ""*"deploy/insert_user.sql ""*"revert/insert_user.sql ""*"verify/insert_user.sql > Rework It > Same files? 192 Wednesday, May 22, 13

Slide 849

Slide 849 text

Same Files? > 193 Wednesday, May 22, 13

Slide 850

Slide 850 text

""git"status #"On"branch"master #"Changes"not"staged"for"commit: #"""(use""git"add"...""to"update"what"will"be"committe #"""(use""git"checkout"**"...""to"discard"changes"in"w # #" modified:"""revert/insert_user.sql #" modified:"""sqitch.plan #" modified:"""test/insert_user.sql # #"Untracked"files: #"""(use""git"add"...""to"include"in"what"will"be"comm # #" deploy/[email protected]*r1.sql #" revert/[email protected]*r1.sql #" verify/[email protected]*r1.sql no"changes"added"to"commit"(use""git"add""and/or""git"commit > Same Files? > 193 Wednesday, May 22, 13

Slide 851

Slide 851 text

""git"status #"On"branch"master #"Changes"not"staged"for"commit: #"""(use""git"add"...""to"update"what"will"be"committe #"""(use""git"checkout"**"...""to"discard"changes"in"w # #" modified:"""revert/insert_user.sql #" modified:"""sqitch.plan #" modified:"""test/insert_user.sql # #"Untracked"files: #"""(use""git"add"...""to"include"in"what"will"be"comm # #" deploy/[email protected]*r1.sql #" revert/[email protected]*r1.sql #" verify/[email protected]*r1.sql no"changes"added"to"commit"(use""git"add""and/or""git"commit > Same Files? > 193 Wednesday, May 22, 13

Slide 852

Slide 852 text

""git"status #"On"branch"master #"Changes"not"staged"for"commit: #"""(use""git"add"...""to"update"what"will"be"committe #"""(use""git"checkout"**"...""to"discard"changes"in"w # #" modified:"""revert/insert_user.sql #" modified:"""sqitch.plan #" modified:"""test/insert_user.sql # #"Untracked"files: #"""(use""git"add"...""to"include"in"what"will"be"comm # #" deploy/[email protected]*r1.sql #" revert/[email protected]*r1.sql #" verify/[email protected]*r1.sql no"changes"added"to"commit"(use""git"add""and/or""git"commit > Same Files? > As of @v1.0.0-r1 193 Wednesday, May 22, 13

Slide 853

Slide 853 text

""git"status #"On"branch"master #"Changes"not"staged"for"commit: #"""(use""git"add"...""to"update"what"will"be"committe #"""(use""git"checkout"**"...""to"discard"changes"in"w # #" modified:"""revert/insert_user.sql #" modified:"""sqitch.plan #" modified:"""test/insert_user.sql # #"Untracked"files: #"""(use""git"add"...""to"include"in"what"will"be"comm # #" deploy/[email protected]*r1.sql #" revert/[email protected]*r1.sql #" verify/[email protected]*r1.sql no"changes"added"to"commit"(use""git"add""and/or""git"commit > Same Files? > 193 Wednesday, May 22, 13

Slide 854

Slide 854 text

""git"status #"On"branch"master #"Changes"not"staged"for"commit: #"""(use""git"add"...""to"update"what"will"be"committe #"""(use""git"checkout"**"...""to"discard"changes"in"w # #" modified:"""revert/insert_user.sql #" modified:"""sqitch.plan #" modified:"""test/insert_user.sql # #"Untracked"files: #"""(use""git"add"...""to"include"in"what"will"be"comm # #" deploy/[email protected]*r1.sql #" revert/[email protected]*r1.sql #" verify/[email protected]*r1.sql no"changes"added"to"commit"(use""git"add""and/or""git"commit > Same Files? > Previous deploy becomes revert 193 Wednesday, May 22, 13

Slide 855

Slide 855 text

What’s the Diff? > 194 Wednesday, May 22, 13

Slide 856

Slide 856 text

What’s the Diff? ""diff"*u"deploy/insert_user.sql diff"**git"a/deploy/insert_user.sql"b/deploy/insert_user.sql @@"*1,6"+1,7"@@ "**"Deploy"insert_user "**"requires:"users "**"requires:"appschema +**"requires:"appschema " "BEGIN; " @@"*8,7"+9,7"@@"CREATE"OR"REPLACE"FUNCTION"flipr.insert_user( """""nickname"TEXT, """""password"TEXT ")"RETURNS"VOID"LANGUAGE"SQL"SECURITY"DEFINER"AS"$$ *""""INSERT"INTO"flipr.users"VALUES($1,"md5($2)); +""""INSERT"INTO"flipr.users"values($1,"crypt($2,"gen_salt('md5'))); "$$; " "COMMIT; > > 194 Wednesday, May 22, 13

Slide 857

Slide 857 text

Send it Up! > 195 Wednesday, May 22, 13

Slide 858

Slide 858 text

Send it Up! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > > 195 Wednesday, May 22, 13

Slide 859

Slide 859 text

>"psql"*d"flipr_test"*c"" """"DELETE"FROM"flipr.users; """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|""""""""""""""password"""""""""""""" **********+************************************ "foo""""""|"$1$nKO47p03$YRXYTt4NoNncTThLyxzEq1 "bar""""""|"$1$LbVUs/p.$LVbvPlkD8rJlixW2nS3WP0 (2"rows) > Send it Up! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > > 195 Wednesday, May 22, 13

Slide 860

Slide 860 text

>"psql"*d"flipr_test"*c"" """"DELETE"FROM"flipr.users; """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|""""""""""""""password"""""""""""""" **********+************************************ "foo""""""|"$1$nKO47p03$YRXYTt4NoNncTThLyxzEq1 "bar""""""|"$1$LbVUs/p.$LVbvPlkD8rJlixW2nS3WP0 (2"rows) > Send it Up! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > > \o/ 195 Wednesday, May 22, 13

Slide 861

Slide 861 text

Can We Go Back? > 196 Wednesday, May 22, 13

Slide 862

Slide 862 text

Can We Go Back? >"sqitch"revert"**to"@HEAD^"*y ""*"insert_user".."ok > > 196 Wednesday, May 22, 13

Slide 863

Slide 863 text

""psql"*d"flipr_test"*c"" """"DELETE"FROM"flipr.users; """"SELECT"flipr.insert_user('foo',"'secr3t'), """""""""""flipr.insert_user('bar',"'secr3t'); """"SELECT"nickname,"password"FROM"flipr.users; " "nickname"|"""""""""""""password""""""""""""" **********+********************************** "foo""""""|"9695da4dd567a19f9b92065f240c6725 "bar""""""|"9695da4dd567a19f9b92065f240c6725 (2"rows) Can We Go Back? >"sqitch"revert"**to"@HEAD^"*y ""*"insert_user".."ok > > 196 Wednesday, May 22, 13

Slide 864

Slide 864 text

Verify How? > 197 Wednesday, May 22, 13

Slide 865

Slide 865 text

Verify How? >"emacs"verify/insert_user.sql > > 197 Wednesday, May 22, 13

Slide 866

Slide 866 text

**"Verify"insert_user BEGIN; SELECT"has_function_privilege( """"'flipr.insert_user(text,"text)', """"'execute' ); verify/insert_u verify/insert_user.sql COMMIT; 198 Wednesday, May 22, 13

Slide 867

Slide 867 text

SELECT"1/COUNT(*) ""FROM"pg_catalog.pg_proc "WHERE"proname"="'insert_user' """AND"pg_get_functiondef(oid) """""""LIKE"$$%crypt($2,"gen_salt('md5'))%$$; **"Verify"insert_user BEGIN; SELECT"has_function_privilege( """"'flipr.insert_user(text,"text)', """"'execute' ); verify/insert_u verify/insert_user.sql COMMIT; 198 Wednesday, May 22, 13

Slide 868

Slide 868 text

SELECT"1/COUNT(*) ""FROM"pg_catalog.pg_proc "WHERE"proname"="'insert_user' """AND"pg_get_functiondef(oid) """""""LIKE"$$%crypt($2,"gen_salt('md5'))%$$; **"Verify"insert_user BEGIN; SELECT"has_function_privilege( """"'flipr.insert_user(text,"text)', """"'execute' ); verify/insert_u verify/insert_user.sql COMMIT; Yeah, compare source. 198 Wednesday, May 22, 13

Slide 869

Slide 869 text

>"emacs"verify/insert_user.sql > Let’s Go! 199 Wednesday, May 22, 13

Slide 870

Slide 870 text

>"emacs"verify/insert_user.sql > Let’s Go! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > 199 Wednesday, May 22, 13

Slide 871

Slide 871 text

>"emacs"verify/insert_user.sql > Let’s Go! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > >"psql"*d"flipr_test"*c"'DELETE"FROM"flipr.users' DELETE"2 > 199 Wednesday, May 22, 13

Slide 872

Slide 872 text

>"emacs"verify/insert_user.sql > Let’s Go! >"sqitch"deploy Deploying"changes"to"flipr_test ""+"insert_user".."ok > >"psql"*d"flipr_test"*c"'DELETE"FROM"flipr.users' DELETE"2 > pg_prove"*d"flipr_test"test/insert_user.sql"""" test/insert_user.sql".."ok""""" All"tests"successful. Files=1,"Tests=12,""0"wallclock"secs Result:"PASS > Shazam! 199 Wednesday, May 22, 13

Slide 873

Slide 873 text

Add, Commit, Push, Go > 200 Wednesday, May 22, 13

Slide 874

Slide 874 text

""git"add". >"git"commit"*m"'Update"insert_user"to"use"pgcrypto.' [master"59f5823]"Update"insert_user"to"use"pgcrypto. "8"files"changed,"66"insertions(+),"25"deletions(*) "create"mode"100644"deploy/[email protected]*r1.sql "create"mode"100644"revert/[email protected]*r1.sql "create"mode"100644"verify/[email protected]*r1.sql > Add, Commit, Push, Go > 200 Wednesday, May 22, 13

Slide 875

Slide 875 text

""git"add". >"git"commit"*m"'Update"insert_user"to"use"pgcrypto.' [master"59f5823]"Update"insert_user"to"use"pgcrypto. "8"files"changed,"66"insertions(+),"25"deletions(*) "create"mode"100644"deploy/[email protected]*r1.sql "create"mode"100644"revert/[email protected]*r1.sql "create"mode"100644"verify/[email protected]*r1.sql > Add, Commit, Push, Go >"git"push Counting"objects:"17,"done. Delta"compression"using"up"to"4"threads. Compressing"objects:"100%"(10/10),"done. Writing"objects:"100%"(10/10),"1.75"KiB,"done. Total"10"(delta"6),"reused"0"(delta"0) To"../flipr*remote """5f4c29a..59f5823""master"*>"master > > 200 Wednesday, May 22, 13

Slide 876

Slide 876 text

antisocial network Change It Up 201 Wednesday, May 22, 13

Slide 877

Slide 877 text

antisocial network Change It Up git reset --hard insert_user2 201 Wednesday, May 22, 13

Slide 878

Slide 878 text

antisocial network Change It Up git reset --hard insert_user2 Rework change_pass 201 Wednesday, May 22, 13

Slide 879

Slide 879 text

antisocial network Change It Up git reset --hard insert_user2 Rework change_pass Use pgcrypo 201 Wednesday, May 22, 13

Slide 880

Slide 880 text

antisocial network Change It Up git reset --hard insert_user2 Rework change_pass Use pgcrypo Test first! 201 Wednesday, May 22, 13

Slide 881

Slide 881 text

antisocial network Change It Up git reset --hard insert_user2 Rework change_pass Use pgcrypo Test first! Bundle, tag, release 201 Wednesday, May 22, 13

Slide 882

Slide 882 text

antisocial network Change It Up git reset --hard insert_user2 Rework change_pass Use pgcrypo Test first! Bundle, tag, release https:/ /github.com/ theory/agile-flipr.git 201 Wednesday, May 22, 13

Slide 883

Slide 883 text

I’m afraid I have some bad news… antisocial network 202 Wednesday, May 22, 13

Slide 884

Slide 884 text

203 Wednesday, May 22, 13

Slide 885

Slide 885 text

Antisocial Networking Startup Flipr Heads To The Deadpool by Michael Arrington on November 2, 2010 antisocial network I loved this site. Flipr, an online “antisocial networking” site that encouraged users to alienate each other in order to increase their antisocial cred, is shutting down. The startup’s homepage now consists of a letter to Flipr users instructing them to download their “flips” by November 30, at which point nearly all of the service’s features will be taken offline and data deleted. In the letter, Flipr CEO David Wheeler writes that despite ample venture funding and a dedicated team of database developers, the site underestimated people’s willingness to be assholes. This is not something I can relate to, although from what I’ve been told by more polite society, it is indeed the case. Such a shame. 203 Wednesday, May 22, 13

Slide 886

Slide 886 text

I’m afraid it’s true. antisocial network RIP 204 Wednesday, May 22, 13

Slide 887

Slide 887 text

I’m sorry I have no money left to pay you. antisocial network RIP 205 Wednesday, May 22, 13

Slide 888

Slide 888 text

I hope you enjoyed working here. antisocial network RIP 206 Wednesday, May 22, 13

Slide 889

Slide 889 text

And that you’re able to use the skills you’ve gained in your next job. antisocial network RIP 207 Wednesday, May 22, 13

Slide 890

Slide 890 text

Git Skillz antisocial network RIP 208 Wednesday, May 22, 13

Slide 891

Slide 891 text

Git Skillz Branching antisocial network RIP 208 Wednesday, May 22, 13

Slide 892

Slide 892 text

Git Skillz Branching Diffing antisocial network RIP 208 Wednesday, May 22, 13

Slide 893

Slide 893 text

Git Skillz Branching Diffing Rebasing antisocial network RIP 208 Wednesday, May 22, 13

Slide 894

Slide 894 text

Git Skillz Branching Diffing Rebasing Merging antisocial network RIP 208 Wednesday, May 22, 13

Slide 895

Slide 895 text

Git Skillz Branching Diffing Rebasing Merging Committing antisocial network RIP 208 Wednesday, May 22, 13

Slide 896

Slide 896 text

Git Skillz Branching Diffing Rebasing Merging Committing Pushing antisocial network RIP 208 Wednesday, May 22, 13

Slide 897

Slide 897 text

MOAR Git antisocial network RIP 209 Wednesday, May 22, 13

Slide 898

Slide 898 text

MOAR Git Bisecting antisocial network RIP 209 Wednesday, May 22, 13

Slide 899

Slide 899 text

MOAR Git Bisecting Blaming antisocial network RIP 209 Wednesday, May 22, 13

Slide 900

Slide 900 text

MOAR Git Bisecting Blaming Pull requests antisocial network RIP 209 Wednesday, May 22, 13

Slide 901

Slide 901 text

MOAR Git Bisecting Blaming Pull requests Submitting patches antisocial network RIP 209 Wednesday, May 22, 13

Slide 902

Slide 902 text

MOAR Git Bisecting Blaming Pull requests Submitting patches Rewriting history antisocial network RIP 209 Wednesday, May 22, 13

Slide 903

Slide 903 text

MOAR Git Bisecting Blaming Pull requests Submitting patches Rewriting history Log formatting antisocial network RIP 209 Wednesday, May 22, 13

Slide 904

Slide 904 text

MOAR Git Bisecting Blaming Pull requests Submitting patches Rewriting history Log formatting git help --all antisocial network RIP 209 Wednesday, May 22, 13

Slide 905

Slide 905 text

pgTAP Skillz antisocial network RIP 210 Wednesday, May 22, 13

Slide 906

Slide 906 text

pgTAP Skillz TDDD antisocial network RIP 210 Wednesday, May 22, 13

Slide 907

Slide 907 text

pgTAP Skillz TDDD Schema testing antisocial network RIP 210 Wednesday, May 22, 13

Slide 908

Slide 908 text

pgTAP Skillz TDDD Schema testing Scalar testing antisocial network RIP 210 Wednesday, May 22, 13

Slide 909

Slide 909 text

pgTAP Skillz TDDD Schema testing Scalar testing Functional testing antisocial network RIP 210 Wednesday, May 22, 13

Slide 910

Slide 910 text

pgTAP Skillz TDDD Schema testing Scalar testing Functional testing Relational testing antisocial network RIP 210 Wednesday, May 22, 13

Slide 911

Slide 911 text

MOAR pgTAP antisocial network RIP 211 Wednesday, May 22, 13

Slide 912

Slide 912 text

MOAR pgTAP Testing privileges antisocial network RIP 211 Wednesday, May 22, 13

Slide 913

Slide 913 text

MOAR pgTAP Testing privileges Mocking interfaces antisocial network RIP 211 Wednesday, May 22, 13

Slide 914

Slide 914 text

MOAR pgTAP Testing privileges Mocking interfaces Custom test functions antisocial network RIP 211 Wednesday, May 22, 13

Slide 915

Slide 915 text

MOAR pgTAP Testing privileges Mocking interfaces Custom test functions xUnit-style testing antisocial network RIP 211 Wednesday, May 22, 13

Slide 916

Slide 916 text

MOAR pgTAP Testing privileges Mocking interfaces Custom test functions xUnit-style testing Tests maintained in functions antisocial network RIP 211 Wednesday, May 22, 13

Slide 917

Slide 917 text

MOAR pgTAP Testing privileges Mocking interfaces Custom test functions xUnit-style testing Tests maintained in functions http:/ /pgtap.org/documentation.html antisocial network RIP 211 Wednesday, May 22, 13

Slide 918

Slide 918 text

Sqitch Skillz antisocial network RIP 212 Wednesday, May 22, 13

Slide 919

Slide 919 text

Sqitch Skillz Adding changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 920

Slide 920 text

Sqitch Skillz Adding changes Dependency management antisocial network RIP 212 Wednesday, May 22, 13

Slide 921

Slide 921 text

Sqitch Skillz Adding changes Dependency management Deploying changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 922

Slide 922 text

Sqitch Skillz Adding changes Dependency management Deploying changes Verifying changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 923

Slide 923 text

Sqitch Skillz Adding changes Dependency management Deploying changes Verifying changes Reverting changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 924

Slide 924 text

Sqitch Skillz Adding changes Dependency management Deploying changes Verifying changes Reverting changes Rebasing changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 925

Slide 925 text

Sqitch Skillz Adding changes Dependency management Deploying changes Verifying changes Reverting changes Rebasing changes Reworking changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 926

Slide 926 text

Sqitch Skillz Adding changes Dependency management Deploying changes Verifying changes Reverting changes Rebasing changes Reworking changes antisocial network RIP 212 Wednesday, May 22, 13

Slide 927

Slide 927 text

MOAR Sqitch antisocial network RIP 213 Wednesday, May 22, 13

Slide 928

Slide 928 text

MOAR Sqitch Cross-project dependencies antisocial network RIP 213 Wednesday, May 22, 13

Slide 929

Slide 929 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database antisocial network RIP 213 Wednesday, May 22, 13

Slide 930

Slide 930 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches antisocial network RIP 213 Wednesday, May 22, 13

Slide 931

Slide 931 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches Checkout command antisocial network RIP 213 Wednesday, May 22, 13

Slide 932

Slide 932 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches Checkout command Reverts to last common change antisocial network RIP 213 Wednesday, May 22, 13

Slide 933

Slide 933 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches Checkout command Reverts to last common change Changes Git branch antisocial network RIP 213 Wednesday, May 22, 13

Slide 934

Slide 934 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches Checkout command Reverts to last common change Changes Git branch Deploys antisocial network RIP 213 Wednesday, May 22, 13

Slide 935

Slide 935 text

MOAR Sqitch Cross-project dependencies Multiple projects, one database Changing Branches Checkout command Reverts to last common change Changes Git branch Deploys sqitch help antisocial network RIP 213 Wednesday, May 22, 13

Slide 936

Slide 936 text

Good luck out there. antisocial network RIP 214 Wednesday, May 22, 13

Slide 937

Slide 937 text

Agile Database Development David E. Wheeler PGCon 2013 Ottawa Text: Attribution-Noncommercial-Share Alike 3.0 United States: http:/ /creativecommons.org/licenses/by-nc-sa/3.0/us/ Images licensed independently and © Their respective owners. iovation 215 Wednesday, May 22, 13