Answers.Body: <p>You haven't said what field type you were using, but I think you should probably be using a <strong>note</strong> field rather than an <strong>alphanumeric</strong>. My understanding is that the <strong>note</strong> field isn't stored as fixed length.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-04T04:00:06.423Z
Answers.Text: Yes, when I redid this with a new field, I spotted the Note option and used that. No problems there. Just didn't equate that with "variable length field" the first time around.
Answers.UserDisplayName: Jeff Porten
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-02T10:05:58.580Z
Answers.LastActivityDate: 2019-11-02T10:05:58.580Z
Answers.UserDisplayName: Mick Kahn
Answers.Body: <p>Agree with Mick Kahn about using a note. As to the spinning cursor and deleting the field if you're unable to do it in the UI, the spinning cursor usually means a fatal error occurred somewhere, so check the web server logs or CiviCRM ConfigAndLog. To delete the custom field manually:</p>
  
  <ol>
  <li>Make a database backup.</li>
  <li>In the list of custom fields if you hover over or click the edit link for the field the url will have <code>id=something</code> in it. Let's say it's id=4.</li>
  <li>Do <code>select custom_group_id,column_name from civicrm_custom_field where id=4;</code></li>
  <li>Let's say it shows <code>7</code> and <code>bio_4</code>.</li>
  <li>Do <code>select table_name from civicrm_custom_group where id=7;</code></li>
  <li>Let's say it shows <code>civicrm_value_something_7</code>.</li>
  <li>Do <code>alter table civicrm_value_something_7 drop column bio_4;</code> NOTE: I think the field was never actually created in the physical table, so this may say "not found" or something. The original create likely had a fatal error <code>Column length too big for column</code> which is why you see the spinning cursor. So if it says not found just keep going.</li>
  <li>Do <code>delete from civicrm_custom_field where id=4;</code></li>
  </ol>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-11-02T13:15:18.377Z
Answers.LastActivityDate: 2019-11-02T13:29:49.747Z
Answers.LastEditDate: 2019-11-02T13:29:49.747Z
Answers.UserDisplayName: Demerit
Body: <p>I added a custom field for authenticated users to add a bio on their profile page (and if there's an existing field I should use for this, please let me know). Not knowing how long I should make this field, and temporarily forgetting that mysql probably uses fixed-width for this, I set the field length to 32767.</p>
  
  <p>It took a long time to create the field, but the page wait dialog finally completed and the field shows up in the Custom Fields list. But having seen the long wait, I decided to re-do the field at 4095 or 8191, and tried to delete the Bio field. THAT progress window has been a spinning blue circle for nearly an hour, and Bio is still showing up in the Custom Fields list in a different tab.</p>
  
  <p>EDIT: perhaps worth noting that the page where I <em>created</em> the field also had a spinning wait cursor nearly 90 minutes after I did so, but I could see the Bio field as expected in the Custom Field list, so that process seems to have completed without letting the page know.</p>
  
  <p>Did I break something, or will this get to my desired state after I wait long enough? This is running on a Linode at $20 a month, so the CPU/RAM is not particularly powerful.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-03T22:21:03.487Z
Comments.Text: A $20 Linode should have sufficient grunt
Comments.UserDisplayName: petednz - fuzion
Tags: <custom-fields><mysql>
Title: Unsure if I just broke my database with a custom field
ThreadText: # Unsure if I just broke my database with a custom field
  
  (Asked by: username_0 on 2019-11-02)
  
  I added a custom field for authenticated users to add a bio on their profile page (and if there's an existing field I should use for this, please let me know). Not knowing how long I should make this field, and temporarily forgetting that mysql probably uses fixed-width for this, I set the field length to 32767.
  
  It took a long time to create the field, but the page wait dialog finally completed and the field shows up in the Custom Fields list. But having seen the long wait, I decided to re-do the field at 4095 or 8191, and tried to delete the Bio field. THAT progress window has been a spinning blue circle for nearly an hour, and Bio is still showing up in the Custom Fields list in a different tab.
  
  EDIT: perhaps worth noting that the page where I *created* the field also had a spinning wait cursor nearly 90 minutes after I did so, but I could see the Bio field as expected in the Custom Field list, so that process seems to have completed without letting the page know.
  
  Did I break something, or will this get to my desired state after I wait long enough? This is running on a Linode at $20 a month, so the CPU/RAM is not particularly powerful.
  
  **Tags:** custom-fields, mysql
  
  > **Comments:**
  > **username_1**: A $20 Linode should have sufficient grunt  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2019-11-02. Score: 1
  
  You haven't said what field type you were using, but I think you should probably be using a **note** field rather than an **alphanumeric**. My understanding is that the **note** field isn't stored as fixed length.
  
  > **Comments:**
  > **username_0**: Yes, when I redid this with a new field, I spotted the Note option and used that. No problems there. Just didn't equate that with "variable length field" the first time around.  
  
  ---
  
  ### Answer by username_3 on 2019-11-02. Score: 0
  
  Agree with username_2 username_2 about using a note. As to the spinning cursor and deleting the field if you're unable to do it in the UI, the spinning cursor usually means a fatal error occurred somewhere, so check the web server logs or CiviCRM ConfigAndLog. To delete the custom field manually:
  
  1. Make a database backup.
  2. In the list of custom fields if you hover over or click the edit link for the field the url will have `id=something` in it. Let's say it's id=4.
  3. Do `select custom_group_id,column_name from civicrm_custom_field where id=4;`
  4. Let's say it shows `7` and `bio_4`.
  5. Do `select table_name from civicrm_custom_group where id=7;`
  6. Let's say it shows `civicrm_value_something_7`.
  7. Do `alter table civicrm_value_something_7 drop column bio_4;` NOTE: I think the field was never actually created in the physical table, so this may say "not found" or something. The original create likely had a fatal error `Column length too big for column` which is why you see the spinning cursor. So if it says not found just keep going.
  8. Do `delete from civicrm_custom_field where id=4;`
  
  
  ---
  
  