Change to using a name map temporarily

This commit is contained in:
Tom Bloor 2019-07-15 03:45:42 +01:00
parent 546193f0cb
commit 4fdff21f50
No known key found for this signature in database
GPG key ID: 4657C7EBE42CC5CC
2 changed files with 20 additions and 57 deletions

View file

@ -22,60 +22,4 @@ 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",
{ id => "buyer_id" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
__PACKAGE__->belongs_to(
"seller",
"Pear::LocalLoop::Schema::Result::Entity",
{ id => "seller_id" },
{ is_deferrable => 0, on_delete => "NO ACTION", on_update => "NO ACTION" },
);
1;