geodesicsolutions-community / geocore-community

GeoCore Community, open source classifieds and auctions software
MIT License
9 stars 6 forks source link

Strip last of geodesicsolutions.com #152

Open vicos59 opened 2 years ago

vicos59 commented 2 years ago

All files were identified in #120.

The only 2 remaining files after these are fixed in #148

After that is merged, we should be able to close #120

vicos59 commented 2 years ago

I tested using mariaDB on my PC. First I ran 1_structure.sql to create the structure, then data_misc.sql to test our data change.

The SQL batch failed with an unrelated error. Coincidentally, it did fail with one of the records that was changed.

-- -- Dumping data for table geodesic_userdata

INSERT INTO `geodesic_userdata` (`id`, `username`, `email`, `email2`, `newsletter`, `level`, `company_name`, `business_type`, `firstname`, `lastname`, `address`, `address_2`, `zip`, `city`, `state`, `country`, `phone`, `phone2`, `fax`, `url`, `date_joined`, `communication_type`, `feedback_score`, `feedback_count`, `feedback_positive_count`, `rate_sum`, `rate_num`, `optional_field_1`, `optional_field_2`, `optional_field_3`, `optional_field_4`, `optional_field_5`, `optional_field_6`, `optional_field_7`, `optional_field_8`, `optional_field_9`, `optional_field_10`, `affiliate_html`, `filter_id`, `expose_email`, `expose_company_name`, `expose_firstname`, `expose_lastname`, `expose_address`, `expose_city`, `expose_state`, `expose_country`, `expose_zip`, `expose_phone`, `expose_phone2`, `expose_fax`, `expose_url`, `expose_optional_1`, `expose_optional_2`, `expose_optional_3`, `expose_optional_4`, `expose_optional_5`, `expose_optional_6`, `expose_optional_7`, `expose_optional_8`, `expose_optional_9`, `expose_optional_10`, `account_balance`, `date_balance_negative`, `balance_freeze`, `feedback_icon`, `storefront_header`, `storefront_template_id`, `storefront_welcome_message`, `storefront_on_hold`, `storefront_home_link`, `storefront_traffic_processed_at`, `last_login_time`, `last_login_ip`, `verified`, `storefront_trials_used`) VALUES

(1, 'admin', 'admin@example.com', '', 0, 1, 'Geodesic Solutions', 0, 'admin', 'admin', 'address', '', 'zipcode', 'city', 'state', 'country', 'phone', '', 'fax', '', 0, 3, 0, 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0.0000, 0, 0, '', '', 0, '', 1, '', 1164053097, '2006-11-21 17:53:07', '192.168.1.124', 'no', '');

/* SQL Error (1364): Field 'attached_user_message' doesn't have a default value */

This happens because mariaDB Strict mode is enabled, as it is by default with all recent mariaDB versions (7.2+ ??).

The SQL script is not explicitly inserting data for attached_user_message and there is no default specified in the table def:

`attached_user_message` text NOT NULL,
`admin_note` text DEFAULT NULL,

This should have failed when I installed it on my test domain since my mariaDB has STRICT mode enabled. I see the admin record was inserted to the table. Hmmm, maybe the setup script disables strict mode? Confused.

If this requires a table alter, I'll leave that to you. I see a few PHP files that do inserts into that table. Not sure if they would be impacted.

Scripts that do INSERTS into geodesic_userdata

  1. Anonymouse Listings
  2. Bridges
  3. import.classes.php function _readyDatabaseForGroup()
  4. There has to be a place where new users are inserted??

I'm not really even sure what is the purpose of that column.