php artisan migrate issue



  • Hi, i got error while running migrate error.
    php artisan migrate
    Migrating: 2019_11_21_194608_add_stored_function_to_get_url_path_of_category

    In Connection.php line 671:

    SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with M
    ariaDB 100108, now running 100414. Please use mysql_upgrade to fix this error (SQL: DROP FUNCTION I
    F EXISTS get_url_path_of_category;
    CREATE FUNCTION get_url_path_of_category(
    categoryId INT,
    localeCode VARCHAR(255)
    )
    RETURNS VARCHAR(255)
    DETERMINISTIC
    BEGIN

                  DECLARE urlPath VARCHAR(255);                                                                    
                  -- Category with id 1 is root by default                                                         
                  IF categoryId <> 1                                                                               
                  THEN                                                                                             
                      SELECT                                                                                       
                          GROUP_CONCAT(parent_translations.slug SEPARATOR '/') INTO urlPath                        
                      FROM                                                                                         
                          categories AS node,                                                                      
                          categories AS parent                                                                     
                          JOIN category_translations AS parent_translations ON parent.id = parent_translations.ca  
    

    tegory_id
    WHERE
    node._lft >= parent._lft
    AND node._rgt <= parent._rgt
    AND node.id = categoryId
    AND parent.id <> 1
    AND parent_translations.locale = localeCode
    GROUP BY
    node.id;

                      IF urlPath IS NULL                                                                           
                      THEN                                                                                         
                          SET urlPath = (SELECT slug FROM category_translations WHERE category_translations.categ  
    

    ory_id = categoryId);
    END IF;
    ELSE
    SET urlPath = '';
    END IF;

                   RETURN urlPath;                                                                                 
              END;)                                                                                                
    

    In PDOConnection.php line 43:

    SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with M
    ariaDB 100108, now running 100414. Please use mysql_upgrade to fix this error

    In PDOConnection.php line 41:

    SQLSTATE[HY000]: General error: 1558 Column count of mysql.proc is wrong. Expected 21, found 20. Created with M
    ariaDB 100108, now running 100414. Please use mysql_upgrade to fix this error



  • Hi @jemish,

    Which version of MySQL/MariaDB are you using?


Log in to reply