Results 1 to 3 of 3

Thread: Please help; Differences found between database and vardefs

  1. #1
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Please help; Differences found between database and vardefs

    Hi,

    I have made a logic hook for my module "Acc_Accounts"
    This logic_hook contains a auto_increment for my "acc_number".

    When i want to repair and rebuild my custom module "Acc_Accounts" i get the following error;

    /* Table : acc_accounts */
    /*COLUMNS*/
    /*MISMATCH WITH DATABASE - acc_number - ROW [name] => 'acc_number' [type] => 'int' [len] => '4' [auto_increment] => '1' */
    /* VARDEF - acc_number - ROW[required] => 'true' [name] => 'acc_number' [vname] => 'LBL_ACC_NUMBER' [type] => 'int' [massupdate] => '0' [duplicate_merge] => 'disabled' [dbType] => 'int' [len] => '11' */
    /* INDEXES */
    ALTER TABLE acc_accounts modify column acc_number int(11) NOT NULL ;

    This is my "vardefs.php" file

    PHP Code:
    $dictionary['Acc_Accounts'] = array(
        
    'table'=>'acc_accounts',
        
    'audited'=>true,
        
    'fields'=>array (
      
    'acc_number' => 
      array (
        
    'required' => true,
        
    'name' => 'acc_number',
        
    'vname' => 'LBL_ACC_NUMBER',
        
    'type' => 'int',
        
    'massupdate' => 0,
        
    'duplicate_merge' => 'disabled',
      ), 
    And in my screenshot you can see how i have set my DB so that the field "acc_number" auto increase (don't know if this is the right way to do it?)

    What am i doing wrong?

    Please help me ! Thankss
    Attached Images Attached Images  
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

  2. #2
    SugarDev.net is offline Sugar Community Member
    Join Date
    Feb 2008
    Posts
    1,401

    Default Re: Please help; Differences found between database and vardefs

    auto increment is something that Sugar should do for you. Do not make any changes to the database structure in phpmyadmin as Sugar will not tolerate it. Foei!

    http://www.sugarcrm.com/wiki/index.php?title=Int
    Developers go here
    Businesses go there (Dutch)

    Modules:
    SugarDev.net Developer Tools | Config | Dutch Language Pack
    "Nothing gets fixed unless there is a bug"

  3. #3
    dekleinemedia is offline A Prolific Poster
    Join Date
    May 2009
    Location
    Netherlands
    Posts
    241

    Default Re: Please help; Differences found between database and vardefs

    Quote Originally Posted by SugarDev.net View Post
    auto increment is something that Sugar should do for you. Do not make any changes to the database structure in phpmyadmin as Sugar will not tolerate it. Foei!

    http://www.sugarcrm.com/wiki/index.php?title=Int
    Okay, thanks it won't happen again
    Kind regards,

    De Kleine Media


    SugarCRM CE v.5.2.0h
    Windows platform
    MySQL v.5.1
    phpMyAdmin - 2.11.2.2
    Apache Server v.2.0

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 2010-03-19, 04:38 PM
  2. Replies: 2
    Last Post: 2009-06-23, 09:23 AM
  3. Replies: 1
    Last Post: 2009-04-03, 07:03 PM
  4. Database Not Found
    By chrislynch8 in forum Installation and Upgrade Help
    Replies: 2
    Last Post: 2007-10-25, 09:35 AM
  5. Replies: 3
    Last Post: 2006-03-21, 10:24 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
  •