Capping-CPCA / Database

all code dealing with the database for this application environment
0 stars 1 forks source link

Phone Numbers #114

Closed blackjack26 closed 7 years ago

blackjack26 commented 7 years ago

The stored procedure agencyMemberInsert() takes an INT for the phone number which is okay, but mismatches the fact that the ContactAgencyMembers table has phone as TEXT.

More importantly, the INT data type only reaches 2147483647 which is equivalent to the phone number (214) 748-3647. If we wanted the phone number (401) 867-5309, it would equate to 4018675309 and we'd get the following error:

ERROR: value "4018675309" is out of range for type integer

We probably need to use BIGINT if we are going to have phone numbers be passed and stored as numbers instead of TEXT.

@sbohner14335 @christianmenk

Dr-Crow commented 7 years ago

@blackjack26 our bad. Phone numbers should be stored on varchar(10). As we are not storing any special characters, we figure UI can display them nicely? We are gearing up for release 2 of the database soon. This will be in that release. You can always look at develop for the newest changes.

blackjack26 commented 7 years ago

Yeah we don't mind storing them as text numbers since we can parse out the ( ) - characters.

blackjack26 commented 7 years ago

@Dr-Crow The issue with the agencyMemberInsert() having phone as an INT parameter is still there.