Permalink
Browse files

Add fields specific to the individual over the more general retrieval.

  • Loading branch information...
William Johnston
William Johnston committed Oct 31, 2013
1 parent 0b0b77f commit a61841c8517a563eac32e247f8a69c4a2e812cc1
Showing with 90 additions and 49 deletions.
  1. +84 −49 ACSSync.install
  2. +6 −0 ACSSync.module
View
@@ -18,59 +18,94 @@ function acs_sync_schema() {
'MiddleName' => array(
'description' => t('The middle name of this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'GoesByName' => array(
'description' => t('The commonly used name for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Title' => array(
'description' => t('The title for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'LastName' => array(
'description' => t('The LastName for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'FirstName' => array(
'description' => t('The FirstName for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'PictureUrl' => array(
'description' => t('The PictureUrl for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'FamilyPosition' => array(
'description' => t('The FamilyPosition for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Suffix' => array(
'description' => t('The Suffix for this individual'),
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
+ 'FullName' => array(
+ 'description' => t('The FullName for this individual'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => false,
+ 'default' => '',
+ ),
+ 'FriendlyName' => array(
+ 'description' => t('The FriendlyName for this individual'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => false,
+ 'default' => '',
+ ),
+ 'FamilyPictureUrl' => array(
+ 'description' => t('The FamilyPictureUrl for this individual'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => false,
+ 'default' => '',
+ ),
+ 'DateOfBirth' => array(
+ 'description' => t('The DateOfBirth for this individual'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => false,
+ 'default' => '',
+ ),
+ 'MemberStatus' => array(
+ 'description' => t('The MemberStatus for this individual'),
+ 'type' => 'varchar',
+ 'length' => 255,
+ 'not null' => false,
+ 'default' => '',
+ ),
),
'unique keys' => array(
'IndvId' => array('IndvId')
@@ -96,7 +131,7 @@ function acs_sync_schema() {
'AddrType' => array(
'description' => t('The address type'),
'type' => 'varchar',
- 'length' => 32,
+ 'length' => 255,
'not null' => TRUE,
'default' => ''
),
@@ -108,32 +143,32 @@ function acs_sync_schema() {
),
'Address2' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'City' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Address' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Longitude' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'State' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'ActiveAddress' => array(
@@ -144,8 +179,8 @@ function acs_sync_schema() {
),
'Zipcode' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'FamilyAddress' => array(
@@ -156,14 +191,14 @@ function acs_sync_schema() {
),
'Country' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Company' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'StatementAddress' => array(
@@ -174,20 +209,20 @@ function acs_sync_schema() {
),
'Latitude' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'CityStateZip' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'AddrTypeId' => array(
'type' => 'int',
'unsigned' => TRUE,
- 'not null' => FALSE
+ 'not null' => false
),
),
'unique keys' => array(
@@ -214,12 +249,12 @@ function acs_sync_schema() {
'PhoneTypeId' => array(
'type' => 'int',
'unsigned' => TRUE,
- 'not null' => FALSE
+ 'not null' => false
),
'PhoneRef' => array(
'type' => 'int',
'unsigned' => TRUE,
- 'not null' => FALSE
+ 'not null' => false
),
'Listed' => array(
'type' => 'int',
@@ -229,7 +264,7 @@ function acs_sync_schema() {
),
'PhoneNumber' => array(
'type' => 'varchar',
- 'length' => 32,
+ 'length' => 255,
'not null' => TRUE,
'default' => ''
),
@@ -253,14 +288,14 @@ function acs_sync_schema() {
),
'Extension' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'PhoneType' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
),
@@ -299,14 +334,14 @@ function acs_sync_schema() {
),
'EmailType' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
'Email' => array(
'type' => 'varchar',
- 'length' => 32,
- 'not null' => FALSE,
+ 'length' => 255,
+ 'not null' => false,
'default' => ''
),
),
View
@@ -84,6 +84,12 @@ function acssync_sync()
return;
}
+ foreach ($result->Page as $simple_person) {
+ $individual = $acsAPI->get_person($simple_person->IndvId);
+ var_dump($individual);
+ return;
+ }
+
// $query = db_insert('accessacs_individuals')
// ->fields(array(
// 'IndvId',

0 comments on commit a61841c

Please sign in to comment.