Forums Forums Community Discussion Loading Data Problem

This topic contains 2 replies, has 1 voice, and was last updated by  pcmonk 4 months, 4 weeks ago.

  • Author
    Posts
  • #2740

    pcmonk
    Participant

    Hi , Im a newbie with CandidATS , tryig to figure out what is the problem of the error im getting
    i should add that i pass the database test and i enabled every pdo extension in wamp.

    Attachments:
    You must be logged in to view attached files.
  • #2742

    pcmonk
    Participant

    I decided to add some more info as i was looking in the community ,
    I use mysql 5.7 but downgraded it to 5.6.4 as it was said in the community it does not support it
    still getting the same error
    full code error of the page

    
    PDOException Object ( [message:protected] => SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'name' [string:Exception:private] => [code:protected] => 42S21 [file:protected] => C:\wamp64\www\lib\ClsNaanalPDO.php [line:protected] => 124 [trace:Exception:private] => Array ( [0] => Array ( [file] => C:\wamp64\www\lib\ClsNaanalPDO.php [line] => 124 [function] => execute [class] => PDOStatement [type] => -> [args] => Array ( ) ) [1] => Array ( [file] => C:\wamp64\www\lib\ClsNaanalPDO.php [line] => 555 [function] => query [class] => ClsNaanalPDO [type] => -> [args] => Array ( [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL ) ) [2] => Array ( [file] => C:\wamp64\www\lib\DatabaseConnectionPDO.php [line] => 149 [function] => setQuery [class] => ClsNaanalPDO [type] => -> [args] => Array ( [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL ) ) [3] => Array ( [file] => C:\wamp64\www\lib\layer\L0\utils.php [line] => 159 [function] => query [class] => DatabaseConnection [type] => -> [args] => Array ( [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL ) ) [4] => Array ( [file] => C:\wamp64\www\lib\layer\L0\utils.php [line] => 187 [function] => MySQLQuery [args] => Array ( [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL ) ) [5] => Array ( [file] => C:\wamp64\www\modules\install\ajax\ui.php [line] => 1076 [function] => MySQLQueryMultiple [args] => Array ( [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>is_extra</code> int(1) default 0; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>presence</code> varchar(255) default 0; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>fieldlabel</code> varchar(255) default NULL; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>defaultvalue</code> TEXT default NULL; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>maximumlength</code> INT(11) DEFAULT '0' ; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>blockid</code> INT(11) DEFAULT '0' ; ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>helpinfo</code> TEXT default NULL; ALTER TABLE <code>joborder</code> ADD COLUMN <code>candidate_mapping</code> text default NULL; ALTER TABLE <code>candidate</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; ALTER TABLE <code>joborder</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; ALTER TABLE <code>company</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; ALTER TABLE <code>contact</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; CREATE TABLE IF NOT EXISTS <code>auieo_blocks</code> ( <code>id</code> int(19) NOT NULL AUTO_INCREMENT, <code>data_item_type_id</code> int(19) NOT NULL, <code>blocklabel</code> varchar(100) NOT NULL, <code>sequence</code> int(10) DEFAULT NULL, <code>show_title</code> int(2) DEFAULT NULL, <code>visible</code> int(2) NOT NULL DEFAULT '0', <code>create_view</code> int(2) NOT NULL DEFAULT '0', <code>edit_view</code> int(2) NOT NULL DEFAULT '0', <code>detail_view</code> int(2) NOT NULL DEFAULT '0', <code>display_status</code> int(1) NOT NULL DEFAULT '1', <code>iscustom</code> int(1) NOT NULL DEFAULT '0', PRIMARY KEY (<code>id</code>), KEY <code>fk_1_auieo_blocks</code> (<code>data_item_type_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS <code>auieo_fields</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>fieldname</code> varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, <code>import_id</code> int(11) DEFAULT NULL, <code>site_id</code> int(11) NOT NULL DEFAULT '0', <code>date_created</code> datetime default CURRENT_TIMESTAMP, <code>data_item_type</code> varchar(30) COLLATE utf8_unicode_ci NOT NULL, <code>uitype</code> int(11) NOT NULL DEFAULT '1', <code>field_options</code> text COLLATE utf8_unicode_ci, <code>position</code> int(4) NOT NULL DEFAULT '0', <code>is_extra</code> int(1) DEFAULT '0', <code>presence</code> int(1) DEFAULT '2', <code>readonly</code> int(1) NOT NULL DEFAULT '0', <code>fieldlabel</code> varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, <code>defaultvalue</code> text COLLATE utf8_unicode_ci NOT NULL, <code>maximumlength</code> int(11) NOT NULL DEFAULT '0', <code>sequence</code> int(11) NOT NULL DEFAULT '0', <code>blockid</code> int(11) NOT NULL DEFAULT '0', <code>displaytype</code> int(11) NOT NULL DEFAULT '0', <code>helpinfo</code> text COLLATE utf8_unicode_ci NULL, PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>fieldname</code> (<code>fieldname</code>,<code>data_item_type</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS <code>auieo_roles</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>rolename</code> varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL, <code>site_id</code> int(11) NOT NULL DEFAULT '0', <code>date_created</code> datetime default CURRENT_TIMESTAMP, <code>parentid</code> int(11) NOT NULL DEFAULT '0', PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>rolename</code> (<code>rolename</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS <code>auieo_profiles</code> ( <code>id</code> int(10) NOT NULL AUTO_INCREMENT, <code>profilename</code> varchar(50) NOT NULL, <code>description</code> text, <code>site_id</code> int(11) NOT NULL DEFAULT '0', PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>profilename</code> (<code>profilename</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS <code>auieo_profiles2permissions</code> ( <code>profileid</code> int(11) DEFAULT NULL, <code>data_item_type</code> int(11) DEFAULT 0, <code>operation</code> int(11) DEFAULT 0, <code>permissions</code> int(1) DEFAULT 0, <code>site_id</code> int(11) NOT NULL DEFAULT '0', UNIQUE KEY <code>profilename</code> (<code>profileid</code>,<code>data_item_type</code>,<code>operation</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO <code>auieo_profiles</code> (<code>id</code>, <code>profilename</code>, <code>description</code>, <code>site_id</code>) VALUES (1, 'Administrator', 'Admin Profile',1), (2, 'Sourcer', '',1), (3, 'DTP', '',1); ALTER TABLE <code>user</code> ADD <code>roleid</code> INT NOT NULL DEFAULT '0' ; CREATE TABLE IF NOT EXISTS <code>auieo_groups</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>groupname</code> varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL, <code>site_id</code> int(11) NOT NULL DEFAULT '0', <code>date_created</code> datetime default CURRENT_TIMESTAMP, PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>groupname</code> (<code>groupname</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; CREATE TABLE IF NOT EXISTS <code>auieo_roles2profiles</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>roleid</code> int(11) NOT NULL, <code>profileid</code> int(11) NOT NULL, <code>site_id</code> int(11) NOT NULL, PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>roles2profiles</code> (<code>roleid</code>,<code>profileid</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS <code>auieo_groups2roles</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>groupid</code> int(11) NOT NULL, <code>roleid</code> int(11) NOT NULL, <code>site_id</code> int(11) NOT NULL, PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>groups2roles</code> (<code>groupid</code>,<code>roleid</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS <code>auieo_groups2users</code> ( <code>id</code> int(11) NOT NULL AUTO_INCREMENT, <code>groupid</code> int(11) NOT NULL, <code>user_id</code> int(11) NOT NULL, <code>site_id</code> int(11) NOT NULL, PRIMARY KEY (<code>id</code>), UNIQUE KEY <code>groups2roles</code> (<code>groupid</code>,<code>user_id</code>,<code>site_id</code>) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; ) ) [6] => Array ( [file] => C:\wamp64\www\ajax.php [line] => 122 [args] => Array ( [0] => C:\wamp64\www\modules\install\ajax\ui.php ) [function] => include ) ) [previous:Exception:private] => [errorInfo] => Array ( [0] => 42S21 [1] => 1060 [2] => Duplicate column name 'name' ) [xdebug_message] => ( ! ) PDOException: SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'name' in C:\wamp64\www\lib\ClsNaanalPDO.php on line 124 Call Stack #TimeMemoryFunctionLocation 10.0004261320{main}( )...\ajax.php:0 20.05494743160include( 'C:\wamp64\www\modules\install\ajax\ui.php' )...\ajax.php:122 30.06415049728MySQLQueryMultiple( )...\ui.php:1076 40.06425059408MySQLQuery( )...\utils.php:187 50.06425059680DatabaseConnection->query( )...\utils.php:159 60.06425059728ClsNaanalPDO->setQuery( )...\DatabaseConnectionPDO.php:149 70.06455059472ClsNaanalPDO->query( )...\ClsNaanalPDO.php:555 80.06455055328execute ( )...\ClsNaanalPDO.php:124 ) ;
    
    Total Errors:0
    PDO Query execution failed prematurely. Error: 1
    1) file:C:\wamp64\www\lib\ClsNaanalPDO.php function:trace Container Function:query line:128
    
    Array
    (
        [0] => PDO Query execution failed prematurely. Error: 1
    )
    
    	
    
    2) file:C:\wamp64\www\lib\ClsNaanalPDO.php class:ClsNaanalPDO type:-> function:query Container Function:setQuery line:555
    
    Array
    (
        [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL
    )
    
    	
    
    3) file:C:\wamp64\www\lib\DatabaseConnectionPDO.php class:ClsNaanalPDO type:-> function:setQuery Container Function:query line:149
    
    Array
    (
        [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL
    )
    
    	
    
    4) file:C:\wamp64\www\lib\layer\L0\utils.php class:DatabaseConnection type:-> function:query Container Function:MySQLQuery line:159
    
    Array
    (
        [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL
    )
    
    	
    
    5) file:C:\wamp64\www\lib\layer\L0\utils.php function:MySQLQuery Container Function:MySQLQueryMultiple line:187
    
    Array
    (
        [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL
    )
    
    	
    
    6) file:C:\wamp64\www\modules\install\ajax\ui.php function:MySQLQueryMultiple Container Function:include line:1076
    
    Array
    (
        [0] => ALTER TABLE <code>activity</code> ADD COLUMN <code>name</code> varchar(255) default NULL;
    
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>is_extra</code> int(1) default 0;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>presence</code> varchar(255) default 0;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>fieldlabel</code> varchar(255) default NULL;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>defaultvalue</code> TEXT default NULL;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>maximumlength</code> INT(11) DEFAULT '0' ;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>blockid</code> INT(11) DEFAULT '0' ;
    ALTER TABLE <code>extra_field_settings</code> ADD COLUMN <code>helpinfo</code> TEXT default NULL;
    
    ALTER TABLE <code>joborder</code> ADD COLUMN <code>candidate_mapping</code> text default NULL;
    
    ALTER TABLE <code>candidate</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; 
    ALTER TABLE <code>joborder</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; 
    ALTER TABLE <code>company</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0';
    ALTER TABLE <code>contact</code> ADD <code>ownertype</code> INT(1) NOT NULL DEFAULT '0'; 
    
    CREATE TABLE IF NOT EXISTS <code>auieo_blocks</code> (
      <code>id</code> int(19) NOT NULL AUTO_INCREMENT,
      <code>data_item_type_id</code> int(19) NOT NULL,
      <code>blocklabel</code> varchar(100) NOT NULL,
      <code>sequence</code> int(10) DEFAULT NULL,
      <code>show_title</code> int(2) DEFAULT NULL,
      <code>visible</code> int(2) NOT NULL DEFAULT '0',
      <code>create_view</code> int(2) NOT NULL DEFAULT '0',
      <code>edit_view</code> int(2) NOT NULL DEFAULT '0',
      <code>detail_view</code> int(2) NOT NULL DEFAULT '0',
      <code>display_status</code> int(1) NOT NULL DEFAULT '1',
      <code>iscustom</code> int(1) NOT NULL DEFAULT '0',
      PRIMARY KEY (<code>id</code>),
      KEY <code>fk_1_auieo_blocks</code> (<code>data_item_type_id</code>)
    ) ENGINE=InnoDB  DEFAULT  CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_fields</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>fieldname</code> varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
      <code>import_id</code> int(11) DEFAULT NULL,
      <code>site_id</code> int(11) NOT NULL DEFAULT '0',
      <code>date_created</code> datetime default CURRENT_TIMESTAMP,
      <code>data_item_type</code> varchar(30) COLLATE utf8_unicode_ci NOT NULL,
      <code>uitype</code> int(11) NOT NULL DEFAULT '1',
      <code>field_options</code> text COLLATE utf8_unicode_ci,
      <code>position</code> int(4) NOT NULL DEFAULT '0',
      <code>is_extra</code> int(1) DEFAULT '0',
      <code>presence</code> int(1) DEFAULT '2',
      <code>readonly</code> int(1) NOT NULL DEFAULT '0',
      <code>fieldlabel</code> varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      <code>defaultvalue</code> text COLLATE utf8_unicode_ci NOT NULL,
      <code>maximumlength</code> int(11) NOT NULL DEFAULT '0',
      <code>sequence</code> int(11) NOT NULL DEFAULT '0',
      <code>blockid</code> int(11) NOT NULL DEFAULT '0',
      <code>displaytype</code> int(11) NOT NULL DEFAULT '0',
      <code>helpinfo</code> text COLLATE utf8_unicode_ci NULL,
      PRIMARY KEY (<code>id</code>),
      UNIQUE KEY <code>fieldname</code> (<code>fieldname</code>,<code>data_item_type</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT  CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_roles</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>rolename</code> varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
      <code>site_id</code> int(11) NOT NULL DEFAULT '0',
      <code>date_created</code> datetime default CURRENT_TIMESTAMP,
      <code>parentid</code> int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (<code>id</code>),
      UNIQUE KEY <code>rolename</code> (<code>rolename</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT  CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_profiles</code> (
      <code>id</code> int(10) NOT NULL AUTO_INCREMENT,
      <code>profilename</code> varchar(50) NOT NULL,
      <code>description</code> text,
      <code>site_id</code> int(11) NOT NULL DEFAULT '0',
      PRIMARY KEY (<code>id</code>),
        UNIQUE KEY <code>profilename</code> (<code>profilename</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_profiles2permissions</code> (
      <code>profileid</code> int(11) DEFAULT NULL,
      <code>data_item_type</code> int(11) DEFAULT 0,
      <code>operation</code> int(11) DEFAULT 0,
      <code>permissions</code> int(1) DEFAULT 0,
      <code>site_id</code> int(11) NOT NULL DEFAULT '0',
      UNIQUE KEY <code>profilename</code> (<code>profileid</code>,<code>data_item_type</code>,<code>operation</code>,<code>site_id</code>)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
    
    INSERT INTO <code>auieo_profiles</code> (<code>id</code>, <code>profilename</code>, <code>description</code>, <code>site_id</code>) VALUES
    (1, 'Administrator', 'Admin Profile',1),
    (2, 'Sourcer', '',1),
    (3, 'DTP', '',1);
    
    ALTER TABLE <code>user</code> ADD <code>roleid</code> INT NOT NULL DEFAULT '0' ;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_groups</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>groupname</code> varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
      <code>site_id</code> int(11) NOT NULL DEFAULT '0',
      <code>date_created</code> datetime default CURRENT_TIMESTAMP,
      PRIMARY KEY (<code>id</code>),
      UNIQUE KEY <code>groupname</code> (<code>groupname</code>,<code>site_id</code>)
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_roles2profiles</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>roleid</code> int(11) NOT NULL,
      <code>profileid</code> int(11) NOT NULL,
      <code>site_id</code> int(11) NOT NULL,
      PRIMARY KEY (<code>id</code>),
      UNIQUE KEY <code>roles2profiles</code> (<code>roleid</code>,<code>profileid</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_groups2roles</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>groupid</code> int(11) NOT NULL,
      <code>roleid</code> int(11) NOT NULL,
      <code>site_id</code> int(11) NOT NULL,
      PRIMARY KEY (<code>id</code>),
      UNIQUE KEY <code>groups2roles</code> (<code>groupid</code>,<code>roleid</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    
    CREATE TABLE IF NOT EXISTS <code>auieo_groups2users</code> (
      <code>id</code> int(11) NOT NULL AUTO_INCREMENT,
      <code>groupid</code> int(11) NOT NULL,
      <code>user_id</code> int(11) NOT NULL,
      <code>site_id</code> int(11) NOT NULL,
      PRIMARY KEY (<code>id</code>),
    UNIQUE KEY <code>groups2roles</code> (<code>groupid</code>,<code>user_id</code>,<code>site_id</code>)
    ) ENGINE=InnoDB  DEFAULT CHARSET=utf8;
    )
    
    	
    
    7) file:C:\wamp64\www\ajax.php function:include Container Function: line:122
    
    Array
    (
        [0] => C:\wamp64\www\modules\install\ajax\ui.php
    )
    
    • This reply was modified 4 months, 4 weeks ago by  pcmonk.
  • #2744

    pcmonk
    Participant

    problem solved ! had to change the default value for datetime from not null default to defaul null. have to add that i removed the whole database and created it again then imported the sql queries in phpmyadmin then all the tables appear.

    my problem is the companies doesnt show when im adding candidates??? how can i fix this ?

You must be logged in to reply to this topic.