1 USING: accessors calendar db db.sqlite db.tuples db.types
2 io.files.temp kernel urls ;
3 IN: tools.deploy.test.17
5 TUPLE: person name birthday homepage occupation ;
8 { "name" "NAME" { VARCHAR 256 } +not-null+ +user-assigned-id+ }
9 { "birthday" "BIRTHDAY" DATETIME +not-null+ }
10 { "homepage" "HOMEPAGE" URL +not-null+ }
11 { "occupation" "OCCUPATION" { VARCHAR 256 } +not-null+ }
14 : db-deploy-test ( -- )
15 "test.db" temp-file <sqlite-db> [
19 "Stephen Hawking" >>name
20 timestamp new 8 >>day 0 >>month 1942 >>year >>birthday
21 "http://en.wikipedia.org/wiki/Stephen_Hawking" >url >>homepage
22 "Dope MC" >>occupation
26 "Stephen Hawking" >>name