diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fbf02ae17d59e3e877ec8766e0db3051120da5ef..c2e0cfe810e962b6f7c41b477f65e4774c63a4b8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -2,7 +2,7 @@ image: docker:20.10.9 variables: DOCKER_TLS_CERTDIR: "/certs" - IMAGE_VER: 0.11.4 + IMAGE_VER: 0.12.0 services: - docker:20.10.9-dind diff --git a/lib/CF2022/Controller/Orders.pm b/lib/CF2022/Controller/Orders.pm index 199f1566dd1c0cad6b2006ccc5028d4319e73851..efd7b52139a845e27273f618176ba68dcef354c5 100644 --- a/lib/CF2022/Controller/Orders.pm +++ b/lib/CF2022/Controller/Orders.pm @@ -163,6 +163,7 @@ sub create ($c ) { email => $order->{email}, api => $url, request => $order, + response => $rc->json, order_id => $rc->json->{code}, }); diff --git a/lib/CF2022/Schema/Result/Order.pm b/lib/CF2022/Schema/Result/Order.pm index 688d2086d3c925efc843d7d330627a6f4f099193..37c92e4500904daa985d9710f3144e9589c03ffd 100644 --- a/lib/CF2022/Schema/Result/Order.pm +++ b/lib/CF2022/Schema/Result/Order.pm @@ -15,12 +15,14 @@ __PACKAGE__->add_columns( id created deleted + paid ip sso_uuid order_id email api request + response ), ); @@ -35,4 +37,13 @@ __PACKAGE__->inflate_column('request', { }, }); +__PACKAGE__->inflate_column('response', { + inflate => sub { + return from_json(shift); + }, + deflate => sub { + return to_json(shift); + }, +}); + 1; diff --git a/sql/2/up.sql b/sql/2/up.sql new file mode 100644 index 0000000000000000000000000000000000000000..09a9a06ff8eb9969ce430e3cc39e0e3c2910a738 --- /dev/null +++ b/sql/2/up.sql @@ -0,0 +1,4 @@ +create sequence "uid_seq" start 100000; + +alter table order "orders" add column "response" text; +alter table order "orders" add column "paid" timestamp(0);