« blib/lib/Ukigumo/Server/DB/Schema.pm
↑ Summary
blib/lib/auto/share/dist/Ukigumo-Server/eg/client.pl »
| 1 | package Ukigumo::Server::Schema; | ||
| 2 | use strict; | ||
| 3 | use warnings; | ||
| 4 | use utf8; | ||
| 5 | |||
| 6 | use DBIx::Schema::DSL; | ||
| 7 | |||
| 8 | default_not_null; | ||
| 9 | |||
| 10 | create_table branch => columns { | ||
| 11 | pk 'branch_id'; | ||
| 12 | varchar 'project'; | ||
| 13 | varchar 'branch'; | ||
| 14 | integer 'last_report_id', null; | ||
| 15 | integer 'ctime'; | ||
| 16 | |||
| 17 | add_unique_index 'project_branch_uniq', [qw/project branch/]; | ||
| 18 | }; | ||
| 19 | |||
| 20 | create_table report => columns { | ||
| 21 | pk 'report_id'; | ||
| 22 | integer 'branch_id'; | ||
| 23 | tinyint 'status'; # 1: success, 2: fail, 3:na | ||
| 24 | text 'repo', null; | ||
| 25 | varchar 'revision', null; | ||
| 26 | text 'vc_log', null; | ||
| 27 | text 'body', null; | ||
| 28 | integer 'ctime'; | ||
| 29 | varchar 'compare_url', null; | ||
| 30 | integer 'elapsed_time_sec', null; | ||
| 31 | |||
| 32 | add_index report_branch_idx => [qw/branch_id/]; | ||
| 33 | }; | ||
| 34 | |||
| 35 | 1; |