Results 1 to 6 of 6

Thread: Quick Repair and Rebuild

  1. #1
    lcurrie is offline Member
    Join Date
    Jun 2010
    Posts
    7

    Default Quick Repair and Rebuild

    Hi All,

    I just did a quick repair and rebuild and it returned a script with the option to export or execute.

    Is there any way I can hurt my install by executing this?

    Lynn

  2. #2
    jnassi's Avatar
    jnassi is offline Sugar Team Member
    Join Date
    Apr 2005
    Posts
    455

    Default Re: Quick Repair and Rebuild

    Quote Originally Posted by lcurrie View Post
    Hi All,

    I just did a quick repair and rebuild and it returned a script with the option to export or execute.

    Is there any way I can hurt my install by executing this?

    Lynn
    Is it from the Repair Database portion? Can you share what the script is?

    I'm assuming it's a series of SQL queries, which you can paste into the Forums here.

  3. #3
    lcurrie is offline Member
    Join Date
    Jun 2010
    Posts
    7

    Default Re: Quick Repair and Rebuild

    Hi Jason,

    Thanks for taking a look. Here's the script:

    Code:
    /* Table : programs */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - service_type -  ROW [name] => 'service_type'  [type] => 'varchar'  [len] => '100'  */
    /* VARDEF - service_type -  ROW[name] => 'service_type'  [vname] => 'LBL_SERVICE_TYPE'  [type] => 'varchar'  [options] => 'service_type_dom'  [len] => '255'  [audited] => '1'  [dbType] => 'enum'  */
    /*MISMATCH WITH DATABASE - account_id -  ROW [name] => 'account_id'  [type] => 'char'  [len] => '36'  */
    /* VARDEF - account_id -  ROW[name] => 'account_id'  [vname] => 'LBL_ACCOUNT_ID'  [type] => 'char'  [dbType] => 'char'  [len] => ''  */
    /*MISMATCH WITH DATABASE - contact_id -  ROW [name] => 'contact_id'  [type] => 'char'  [len] => '36'  */
    /* VARDEF - contact_id -  ROW[name] => 'contact_id'  [vname] => 'LBL_CONTACT_ID'  [type] => 'char'  [dbType] => 'char'  [len] => ''  */
    /* INDEXES */
    ALTER TABLE programs   modify column service_type varchar(255)  NULL ,  modify column account_id char(255)  NULL ,  modify column contact_id char(255)  NULL ;
    /* Table : programs_events */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - url -  ROW [name] => 'url'  [type] => 'varchar'  [len] => '100'  */
    /* VARDEF - url -  ROW[name] => 'url'  [vname] => 'LBL_URL'  [type] => 'url'  [len] => '50'  [massupdate] => ''  [dbType] => 'url'  */
    /*MISMATCH WITH DATABASE - account_id -  ROW [name] => 'account_id'  [type] => 'char'  [len] => '36'  */
    /* VARDEF - account_id -  ROW[name] => 'account_id'  [vname] => 'LBL_ACCOUNT_ID'  [type] => 'char'  [dbType] => 'char'  [len] => ''  */
    /*MISMATCH WITH DATABASE - contact_id -  ROW [name] => 'contact_id'  [type] => 'char'  [len] => '36'  */
    /* VARDEF - contact_id -  ROW[name] => 'contact_id'  [vname] => 'LBL_CONTACT_ID'  [type] => 'char'  [dbType] => 'char'  [len] => ''  */
    /* INDEXES */
    ALTER TABLE programs_events   modify column url   NULL ,  modify column account_id char(255)  NULL ,  modify column contact_id char(255)  NULL ;
    /* Table : programs_events_dates */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - account_id -  ROW [name] => 'account_id'  [type] => 'varchar'  [len] => '36'  */
    /* VARDEF - account_id -  ROW[name] => 'account_id'  [vname] => 'LBL_ACCOUNT_ID'  [type] => 'char'  [dbType] => 'char'  [len] => ''  */
    /* INDEXES */
    ALTER TABLE programs_events_dates   modify column account_id char(255)  NULL ;
    /* Table : affiliations */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - affiliation_type -  ROW [name] => 'affiliation_type'  [type] => 'varchar'  [len] => '50'  */
    /* VARDEF - affiliation_type -  ROW[name] => 'affiliation_type'  [vname] => 'LBL_AFFILIATION_TYPE'  [type] => 'varchar'  [options] => 'affiliation_type_dom'  [required] => 'true'  [massupdate] => ''  [dbType] => 'enum'  [len] => '255'  */
    /*MISMATCH WITH DATABASE - parent_type -  ROW [name] => 'parent_type'  [type] => 'varchar'  [len] => '25'  */
    /* VARDEF - parent_type -  ROW[name] => 'parent_type'  [type] => 'varchar'  [vname] => 'LBL_PARENT_TYPE'  [group] => 'parent_name'  [required] => 'true'  [massupdate] => ''  [len] => '100'  [dbType] => 'varchar'  */
    /* INDEXES */
    ALTER TABLE affiliations   modify column affiliation_type varchar(255)  NOT NULL ,  modify column parent_type varchar(100)  NOT NULL ;
    /* Table : tags */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - name -  ROW [name] => 'name'  [type] => 'varchar'  [len] => '150'  */
    /* VARDEF - name -  ROW[name] => 'name'  [vname] => 'LBL_NAME'  [type] => 'varchar'  [dbType] => 'varchar'  [len] => '255'  [unified_search] => '1'  [required] => 'true'  */
    /*MISMATCH WITH DATABASE - date_entered -  ROW [name] => 'date_entered'  [type] => 'datetime'  [required] => 'true'  */
    /* VARDEF - date_entered -  ROW[name] => 'date_entered'  [vname] => 'LBL_DATE_ENTERED'  [type] => 'datetime'  [group] => 'created_by_name'  [comment] => 'Date record created'  [dbType] => 'datetime'  [len] => ''  */
    /*MISMATCH WITH DATABASE - date_modified -  ROW [name] => 'date_modified'  [type] => 'datetime'  [required] => 'true'  */
    /* VARDEF - date_modified -  ROW[name] => 'date_modified'  [vname] => 'LBL_DATE_MODIFIED'  [type] => 'datetime'  [group] => 'modified_by_name'  [comment] => 'Date record last modified'  [dbType] => 'datetime'  [len] => ''  */
    /*MISMATCH WITH DATABASE - modified_user_id -  ROW [name] => 'modified_user_id'  [type] => 'char'  [len] => '36'  [required] => 'true'  */
    /* VARDEF - modified_user_id -  ROW[name] => 'modified_user_id'  [rname] => 'user_name'  [id_name] => 'modified_user_id'  [vname] => 'LBL_MODIFIED_ID'  [type] => 'char'  [table] => 'users'  [isnull] => 'false'  [group] => 'modified_by_name'  [dbType] => 'id'  [reportable] => '1'  [comment] => 'User who last modified record'  [len] => '36'  */
    /* INDEXES */
    ALTER TABLE tags   modify column name varchar(255)  NOT NULL ,  modify column date_entered datetime  NULL ,  modify column date_modified datetime  NULL ,  modify column modified_user_id char(36)  NULL ;

  4. #4
    jnassi's Avatar
    jnassi is offline Sugar Team Member
    Join Date
    Apr 2005
    Posts
    455

    Default Re: Quick Repair and Rebuild

    To be safe, you should do a backup of your database before proceeding.

    The gist of what the commands are doing is taking an existing column in the database tables, and widening the column.

    For instance, in the affiliations table, the parent_type column can only store 25 characters BEFORE the script is run. The script is telling your database to set the parent_type column to be able to store 100 characters.

    All of these commands will be sent to your database to execute, and should be safe to execute. They're all benign, in my opinion.

    The one caveat would be if your Sugar instance contains tens of thousands of records in each module that would be affected... if that's the case, then the script could be slow to execute. That's really only a concern for Sugar instances with a LOT of data built up over time.

  5. #5
    lcurrie is offline Member
    Join Date
    Jun 2010
    Posts
    7

    Default Re: Quick Repair and Rebuild

    Thanks for the feedback.

    I've done the backup and the database is relatively empty. The only info I have in it is newly imported.

    Lynn

  6. #6
    lcurrie is offline Member
    Join Date
    Jun 2010
    Posts
    7

    Default Re: Quick Repair and Rebuild

    Hmmm. Strange things happening.

    When trying to execute the script, I get the following error:

    Executing repair query: Query Failed:ALTER TABLE programs_events modify column url NULL , modify column account_id char(255) NULL , modify column contact_id char(255) NULL::MySQL error 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'NULL , modify column account_id char(255) NULL , modify column contact_id cha' at line 1

    I'm running PHP Version 5.2.14
    and MySQL 5.1.26-rc-5.1.26rc

    Lynn

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 2
    Last Post: 2011-03-30, 06:47 AM
  2. Cannot do Quick Repair and Rebuild
    By milkesd in forum Help
    Replies: 9
    Last Post: 2010-04-19, 01:34 AM
  3. Quick Repair and Rebuild - Mismatch with Database
    By jeffbrumbaugh in forum Help
    Replies: 2
    Last Post: 2010-03-24, 12:31 PM
  4. Replies: 1
    Last Post: 2008-04-10, 02:19 PM
  5. Lost Portion of Quick Repair and Rebuild
    By johnnyo2 in forum Help
    Replies: 2
    Last Post: 2008-03-02, 07:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •