[freeside-commits] freeside/FS/FS Schema.pm, 1.239.2.22, 1.239.2.23 areacode.pm, 1.1.2.2, 1.1.2.3
Mark Wells
mark at wavetail.420.am
Mon Mar 28 16:02:01 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv4517/FS/FS
Modified Files:
Tag: FREESIDE_2_1_BRANCH
Schema.pm areacode.pm
Log Message:
primary key for areacode table
Index: areacode.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/areacode.pm,v
retrieving revision 1.1.2.2
retrieving revision 1.1.2.3
diff -u -w -d -r1.1.2.2 -r1.1.2.3
--- areacode.pm 28 Mar 2011 19:04:06 -0000 1.1.2.2
+++ areacode.pm 28 Mar 2011 23:01:59 -0000 1.1.2.3
@@ -25,27 +25,20 @@
=head1 DESCRIPTION
-An FS::areacode object represents an example. FS::areacode inherits from
+An FS::areacode object represents an area code. FS::areacode inherits from
FS::Record. The following fields are currently supported:
=over 4
-=item code
-
-area code (primary key)
-
-=item country
-
-two-letter country code
-
-=item state
+=item areanum - primary key
-two-letter state code, if appropriate
+=item code - area code
-=item description
+=item country - two-letter country code
-description (optional)
+=item state - two-letter state code, if appropriate
+=item description - description (optional)
=back
@@ -92,7 +85,8 @@
my $self = shift;
my $error =
- $self->ut_number('code')
+ $self->ut_numbern('areanum')
+ || $self->ut_number('code')
|| $self->ut_text('country')
|| $self->ut_textn('state')
|| $self->ut_textn('description')
Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.239.2.22
retrieving revision 1.239.2.23
diff -u -w -d -r1.239.2.22 -r1.239.2.23
--- Schema.pm 28 Mar 2011 19:04:06 -0000 1.239.2.22
+++ Schema.pm 28 Mar 2011 23:01:58 -0000 1.239.2.23
@@ -3067,13 +3067,14 @@
'areacode' => {
'columns' => [
+ 'areanum', 'serial', '', '', '', '',
'code', 'char', '', 3, '', '',
'country', 'char', 'NULL', 2, '', '',
'state', 'char', 'NULL', 2, '', '',
'description','varchar', 'NULL', 255, '', '',
],
- 'primary_key' => 'code',
- 'unique' => [],
+ 'primary_key' => 'areanum',
+ 'unique' => [ [ 'code' ] ],
'index' => [],
},
More information about the freeside-commits
mailing list