line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Memorator::Backend::Mojo::Pg; |
2
|
1
|
|
|
1
|
|
1087
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
23
|
|
3
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
4
|
|
|
|
|
|
|
{ our $VERSION = '0.006'; } |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
4
|
use Mojo::Base 'Memorator::Backend'; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
5
|
|
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub migration { |
9
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
10
|
0
|
|
|
|
|
|
my $table = $self->table_name; |
11
|
0
|
|
|
|
|
|
return <<"END"; |
12
|
|
|
|
|
|
|
-- 1 up |
13
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS $table ( |
14
|
|
|
|
|
|
|
id bigserial NOT NULL PRIMARY KEY, |
15
|
|
|
|
|
|
|
eid text NOT NULL, |
16
|
|
|
|
|
|
|
jid bigint NOT NULL, |
17
|
|
|
|
|
|
|
active int NOT NULL DEFAULT 1 |
18
|
|
|
|
|
|
|
); |
19
|
|
|
|
|
|
|
-- 1 down |
20
|
|
|
|
|
|
|
DROP TABLE $table; |
21
|
|
|
|
|
|
|
END |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |