summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/Schema.pm3
-rw-r--r--FS/FS/part_pkg.pm1
2 files changed, 3 insertions, 1 deletions
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index fbeeb0d4b..9aa865607 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -2134,11 +2134,12 @@ sub tables_hashref {
'successor', 'int', 'NULL', '', '', '',
'family_pkgpart','int', 'NULL', '', '', '',
'delay_start', 'int', 'NULL', '', '', '',
+ 'agent_pkgpartid', 'varchar', 'NULL', 20, '', '',
],
'primary_key' => 'pkgpart',
'unique' => [],
'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ],
- [ 'agentnum' ], ['no_auto'],
+ [ 'agentnum' ], ['no_auto'], ['agent_pkgpartid'],
],
},
diff --git a/FS/FS/part_pkg.pm b/FS/FS/part_pkg.pm
index a679cf3aa..d1ec0fb55 100644
--- a/FS/FS/part_pkg.pm
+++ b/FS/FS/part_pkg.pm
@@ -636,6 +636,7 @@ sub check {
|| $self->ut_numbern('delay_start')
|| $self->ut_foreign_keyn('successor', 'part_pkg', 'pkgpart')
|| $self->ut_foreign_keyn('family_pkgpart', 'part_pkg', 'pkgpart')
+ || $self->ut_alphan('agent_pkgpartid')
|| $self->SUPER::check
;
return $error if $error;