#3: Remove unused fields from member records
authorIgor Scheller <igor.scheller@igorshp.de>
Sat, 2 Dec 2017 19:46:02 +0000 (20:46 +0100)
committerIgor Scheller <igor.scheller@igorshp.de>
Sat, 2 Dec 2017 19:46:02 +0000 (20:46 +0100)
include/members.php
include/xlsexport.php
install.sql
update.sql

index e7395c6..587d941 100644 (file)
@@ -85,16 +85,6 @@ function validate_member($userdata, &$db_data, &$validation)
         'city'             => 'string',
         'country'          => 'string',
         'email'            => 'string',
-        'phone'            => 'string',
-        'fax'              => 'string',
-        'mobile'           => 'string',
-        'jabber'           => 'string',
-        'icq'              => 'string',
-        'msn'              => 'string',
-        'aim'              => 'string',
-        'skype'            => 'string',
-        'url'              => 'string',
-        'twitter'          => 'string',
     );
     $orig = $db_data;
     foreach ($fields as $name => $type) {
@@ -509,19 +499,6 @@ function form_member($member = array(), $readonly = false, $log_messages = array
             <?php echo html_text_field('Ort', 'city', $member, $readonly) ?>
             <?php echo html_text_field('Land', 'country', $member, $readonly) ?>
         </fieldset>
-        <fieldset>
-            <legend>Sonstiges</legend>
-            <?php echo html_text_field('Telefon', 'phone', $member, $readonly) ?>
-            <?php echo html_text_field('Fax', 'fax', $member, $readonly) ?>
-            <?php echo html_text_field('Handy', 'mobile', $member, $readonly) ?>
-            <?php echo html_text_field('Jabber', 'jabber', $member, $readonly) ?>
-            <?php echo html_text_field('ICQ', 'icq', $member, $readonly) ?>
-            <?php echo html_text_field('MSN', 'msn', $member, $readonly) ?>
-            <?php echo html_text_field('AIM', 'aim', $member, $readonly) ?>
-            <?php echo html_text_field('Skype', 'skype', $member, $readonly) ?>
-            <?php echo html_text_field('Website', 'url', $member, $readonly) ?>
-            <?php echo html_text_field('Twitter', 'twitter', $member, $readonly) ?>
-        </fieldset>
         <?php if (!$readonly) : ?>
             <input class="submit" type="submit" name="submit" value="Speichern"/>
         <?php else : ?>
index de3c4fc..36b8539 100644 (file)
@@ -29,16 +29,6 @@ function action_export_members()
     $worksheet->write($row, $col++, 'PLZ');
     $worksheet->write($row, $col++, 'Ort');
     $worksheet->write($row, $col++, 'Land');
-    $worksheet->write($row, $col++, 'Telefon');
-    $worksheet->write($row, $col++, 'Fax');
-    $worksheet->write($row, $col++, 'Handy');
-    $worksheet->write($row, $col++, 'Jabber');
-    $worksheet->write($row, $col++, 'ICQ');
-    $worksheet->write($row, $col++, 'MSN');
-    $worksheet->write($row, $col++, 'AIM');
-    $worksheet->write($row, $col++, 'Skype');
-    $worksheet->write($row, $col++, 'Website');
-    $worksheet->write($row, $col++, 'Twitter');
     $worksheet->write($row, $col++, 'Lastschrifteinzug');
     $worksheet->write($row, $col++, 'Mandatunterschriftsdatum');
     $worksheet->write($row, $col, 'Status');
@@ -56,16 +46,6 @@ function action_export_members()
         $worksheet->write($row, $col++, $member['postcode']);
         $worksheet->write($row, $col++, $member['city']);
         $worksheet->write($row, $col++, $member['country']);
-        $worksheet->write($row, $col++, $member['phone']);
-        $worksheet->write($row, $col++, $member['fax']);
-        $worksheet->write($row, $col++, $member['mobile']);
-        $worksheet->write($row, $col++, $member['jabber']);
-        $worksheet->write($row, $col++, $member['icq']);
-        $worksheet->write($row, $col++, $member['msn']);
-        $worksheet->write($row, $col++, $member['aim']);
-        $worksheet->write($row, $col++, $member['skype']);
-        $worksheet->write($row, $col++, $member['url']);
-        $worksheet->write($row, $col++, $member['twitter']);
         $worksheet->write($row, $col++, $member['directdebit']);
         $worksheet->write($row, $col++, $member['ddmandatesigdate']);
         $membership_info = fees_info_for_member($member['id'], time());
index 10ed465..b9c267d 100644 (file)
@@ -16,16 +16,6 @@ CREATE TABLE IF NOT EXISTS `members` (
   `city`             VARCHAR(255)     NOT NULL,
   `country`          VARCHAR(255)     NOT NULL,
   `email`            VARCHAR(255)     NOT NULL,
-  `phone`            VARCHAR(255)     NOT NULL,
-  `fax`              VARCHAR(255)     NOT NULL,
-  `mobile`           VARCHAR(255)     NOT NULL,
-  `jabber`           VARCHAR(255)     NOT NULL,
-  `icq`              VARCHAR(255)     NOT NULL,
-  `msn`              VARCHAR(255)     NOT NULL,
-  `aim`              VARCHAR(255)     NOT NULL,
-  `skype`            VARCHAR(255)     NOT NULL,
-  `url`              VARCHAR(255)     NOT NULL,
-  `twitter`          VARCHAR(255)     NOT NULL,
   `created_at`       DATETIME         NOT NULL,
   `modified_at`      DATETIME         NOT NULL,
   PRIMARY KEY (`id`),
index 1b1f55d..8d53dae 100644 (file)
@@ -1,5 +1,4 @@
-/** After refactoring **/
-
+/** After refactoring */
 RENAME TABLE
     `memberdb_members` TO `members`;
 
@@ -14,3 +13,16 @@ RENAME TABLE
 
 RENAME TABLE
     `memberdb_expenses` TO `expenses`;
+
+/** #3: Remove unused fields from member records */
+ALTER TABLE `members`
+  DROP `fax`,
+  DROP `phone`,
+  DROP `mobile`,
+  DROP `jabber`,
+  DROP `icq`,
+  DROP `msn`,
+  DROP `aim`,
+  DROP `skype`,
+  DROP `url`,
+  DROP `twitter`;