[freeside-commits] freeside/FS/FS Schema.pm, 1.277, 1.278 areacode.pm, 1.1, 1.2

Mark Wells mark at wavetail.420.am
Mon Mar 28 18:04:33 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv15041/FS/FS

Modified Files:
	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
retrieving revision 1.2
diff -u -w -d -r1.1 -r1.2
--- areacode.pm	1 Mar 2011 04:09:22 -0000	1.1
+++ areacode.pm	29 Mar 2011 01:04:31 -0000	1.2
@@ -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.277
retrieving revision 1.278
diff -u -w -d -r1.277 -r1.278
--- Schema.pm	21 Mar 2011 00:55:11 -0000	1.277
+++ Schema.pm	29 Mar 2011 01:04:31 -0000	1.278
@@ -3270,13 +3270,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' => [ [ 'areanum' ] ],
       'index'  => [],
     },
 



More information about the freeside-commits mailing list