From 546193f0cb1bb88f506cf19931545ded8b64678e Mon Sep 17 00:00:00 2001 From: Tom Bloor Date: Mon, 15 Jul 2019 02:48:49 +0100 Subject: [PATCH] Updated view with actual column spec --- .../Result/ViewQuantisedTransactionPg.pm | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/lib/Pear/LocalLoop/Schema/Result/ViewQuantisedTransactionPg.pm b/lib/Pear/LocalLoop/Schema/Result/ViewQuantisedTransactionPg.pm index c710908..8f865e7 100644 --- a/lib/Pear/LocalLoop/Schema/Result/ViewQuantisedTransactionPg.pm +++ b/lib/Pear/LocalLoop/Schema/Result/ViewQuantisedTransactionPg.pm @@ -22,6 +22,48 @@ SELECT "value", FROM "transactions" /); +__PACKAGE__->add_columns( + "buyer_id" => { + data_type => "integer", + is_foreign_key => 1, + is_nullable => 0, + }, + "seller_id" => { + data_type => "integer", + is_foreign_key => 1, + is_nullable => 0, + }, + "value" => { + data_type => "numeric", + size => [ 100, 0 ], + is_nullable => 0, + }, + "quantised_hours" => { + data_type => "datetime", + timezone => "UTC", + is_nullable => 0, + set_on_create => 1, + }, + "quantised_days" => { + data_type => "datetime", + timezone => "UTC", + is_nullable => 0, + set_on_create => 1, + }, + "quantised_weeks" => { + data_type => "datetime", + timezone => "UTC", + is_nullable => 0, + set_on_create => 1, + }, + "quantised_months" => { + data_type => "datetime", + timezone => "UTC", + is_nullable => 0, + set_on_create => 1, + }, +); + __PACKAGE__->belongs_to( "buyer", "Pear::LocalLoop::Schema::Result::Entity",