Update organisation with extra information required for entity upgrade
This commit is contained in:
parent
7042020969
commit
4f99ef82f6
1 changed files with 24 additions and 13 deletions
|
@ -15,6 +15,11 @@ __PACKAGE__->add_columns(
|
||||||
is_auto_increment => 1,
|
is_auto_increment => 1,
|
||||||
is_nullable => 0,
|
is_nullable => 0,
|
||||||
},
|
},
|
||||||
|
entity_id => {
|
||||||
|
data_type => 'integer',
|
||||||
|
is_nullable => 0,
|
||||||
|
is_foreign_key => 1,
|
||||||
|
},
|
||||||
name => {
|
name => {
|
||||||
data_type => 'varchar',
|
data_type => 'varchar',
|
||||||
size => 255,
|
size => 255,
|
||||||
|
@ -34,27 +39,33 @@ __PACKAGE__->add_columns(
|
||||||
size => 16,
|
size => 16,
|
||||||
is_nullable => 1,
|
is_nullable => 1,
|
||||||
},
|
},
|
||||||
|
country => {
|
||||||
|
data_type => 'varchar',
|
||||||
|
size => 255,
|
||||||
|
is_nullable => 1,
|
||||||
|
},
|
||||||
sector => {
|
sector => {
|
||||||
data_type => "varchar",
|
data_type => 'varchar',
|
||||||
size => 1,
|
size => 1,
|
||||||
is_nullable => 1,
|
is_nullable => 1,
|
||||||
},
|
},
|
||||||
|
pending => {
|
||||||
|
data_type => 'boolean',
|
||||||
|
default_value => \"0",
|
||||||
|
is_nullable => 0,
|
||||||
|
},
|
||||||
|
submitted_by_id => {
|
||||||
|
data_type => 'integer',
|
||||||
|
is_nullable => 1,
|
||||||
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
__PACKAGE__->set_primary_key('id');
|
__PACKAGE__->set_primary_key('id');
|
||||||
|
|
||||||
__PACKAGE__->has_many(
|
__PACKAGE__->belongs_to(
|
||||||
"transactions",
|
"entity",
|
||||||
"Pear::LocalLoop::Schema::Result::Transaction",
|
"Pear::LocalLoop::Schema::Result::Entity",
|
||||||
{ "foreign.seller_id" => 'self.id' },
|
"entity_id",
|
||||||
{ cascade_copy => 0, cascade_delete => 0 },
|
|
||||||
);
|
|
||||||
|
|
||||||
__PACKAGE__->might_have(
|
|
||||||
"user",
|
|
||||||
"Pear::LocalLoop::Schema::Result::User",
|
|
||||||
{ "foreign.organisation_id" => 'self.id' },
|
|
||||||
{ cascade_copy => 0, cascade_delete => 0 },
|
|
||||||
);
|
);
|
||||||
|
|
||||||
1;
|
1;
|
||||||
|
|
Reference in a new issue