-
-
Notifications
You must be signed in to change notification settings - Fork 529
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error on bin/console doctrine:schema:create #191
Comments
That doesn't look like a healthy PHP environment. If you installed with Regarding backup: You need to backup your |
Hi, I have checked the symfony requirements and updated them. But I still get these error.
|
Every new version will have to updated by script but without git because for YunoHost we need to check the checksum before we get the sources. So the process of upgrade needs to be done without git. |
Okay, we have to discuss the upgrade process separately, but I will support you as good as I can. But please open another ticket for it. I have never checked the MariaDB requirements to be honest. Which MariaDB version are you using? |
The version is 10.1.26-MariaDB |
I am also having the same issue... when I run composer install, no errors, etc. But when I try to run bin/console doctrine:schema:create I get the following: [root@localhost html]# bin/console doctrine:schema:create ! Creating database schema... 17:21:29 ERROR [console] Error thrown while running command "doctrine:schema:create". Message: "Schema-Tool failed with Error 'An exception occurred while executing 'CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) NOT NULL, mail VARCHAR(160) NOT NULL, password VARCHAR(254) DEFAULT NULL, alias VARCHAR(60) DEFAULT NULL, active TINYINT(1) NOT NULL, registration_date DATETIME DEFAULT NULL, title VARCHAR(50) DEFAULT NULL, avatar VARCHAR(255) DEFAULT NULL, roles JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06 (name), UNIQUE INDEX UNIQ_B9AC5BCE5126AC48 (mail), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':\n\nSQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06' at line 1' while executing DDL: CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) NOT NULL, mail VARCHAR(160) NOT NULL, password VARCHAR(254) DEFAULT NULL, alias VARCHAR(60) DEFAULT NULL, active TINYINT(1) NOT NULL, registration_date DATETIME DEFAULT NULL, title VARCHAR(50) DEFAULT NULL, avatar VARCHAR(255) DEFAULT NULL, roles JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06 (name), UNIQUE INDEX UNIQ_B9AC5BCE5126AC48 (mail), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB" ["exception" => Doctrine\ORM\Tools\ToolsException { …},"command" => "doctrine:schema:create","message" => """ Schema-Tool failed with Error 'An exception occurred while executing 'CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) NOT NULL, mail VARCHAR(160) NOT NULL, password VARCHAR(254) DEFAULT NULL, alias VARCHAR(60) DEFAULT NULL, active TINYINT(1) NOT NULL, registration_date DATETIME DEFAULT NULL, title VARCHAR(50) DEFAULT NULL, avatar VARCHAR(255) DEFAULT NULL, roles JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06 (name), UNIQUE INDEX UNIQ_B9AC5BCE5126AC48 (mail), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB':\n \n SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06' at line 1' while executing DDL: CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) NOT NULL, mail VARCHAR(160) NOT NULL, password VARCHAR(254) DEFAULT NULL, alias VARCHAR(60) DEFAULT NULL, active TINYINT(1) NOT NULL, registration_date DATETIME DEFAULT NULL, title VARCHAR(50) DEFAULT NULL, avatar VARCHAR(255) DEFAULT NULL, roles JSON NOT NULL COMMENT '(DC2Type:json_array)', UNIQUE INDEX UNIQ_B9AC5BCE5E237E06 (name), UNIQUE INDEX UNIQ_B9AC5BCE5126AC48 (mail), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci ENGINE = InnoDB """] [] In ToolsException.php line 34: Schema-Tool failed with Error 'An exception occurred while executing 'CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name V SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your In AbstractMySQLDriver.php line 98: An exception occurred while executing 'CREATE TABLE kimai2_users (id INT AUTO_INCREMENT NOT NULL, name VARCHAR(60) NOT NULL, mail VARCH SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your In PDOConnection.php line 109: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your In PDOConnection.php line 107: SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your doctrine:schema:create [--dump-sql] [--em [EM]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] Any help or direct would be very helpful. |
Unfortunately the only two solutions I can provide by now:
Could you please post your OS/DB & PHP version. I'd like to gather some information and check if this could be a common issue on some major distributions shipping "older" software packages. You can use these commands:
|
I updated the database to MariaDB 10.3. That did the trick... the version that is currently in CentOS yum repositories is definitely a little older... Appreciate your help! Here's the information you requested. Operating System: CentOS Linux 7 (Core) [OLD] mysql Ver 15.1 Distrib 5.5.56-MariaDB, for Linux (x86_64) using readline 5.1 PHP 7.2.7 (cli) (built: Jun 20 2018 08:21:26) ( NTS ) Cheers and thanks again for the pointer. |
@kevinpapst Hey mate. I am getting the exact same error as JBSwin, however, in my case I am trying to install it on a shared hosting.
In terms of requirements, I have verified them and have all the extensions installed.
Unfortunately, I cannot follow the recommendations because it is a shared hosting. Hosting setup is as follows (from what I could figure out):
Any help would be appreciated. I haven't programmed in PHP in 15 years, so not much I could do on my own. |
@darkfishy on a shared hosting you likely won't be able to update your database server. If not, you have only one choice: you need to use SQLite for now. Regarding the requirements: check if it works, I guess these points are only recommendations and not required. Please open a new issue for everything that is unrelated to the above SQL problems. |
I added the MariaDB requirement to the docu and created an FAQ entry for that problem as there will be more users in the future with the same problem. See https://github.com/kevinpapst/kimai2/blob/master/var/docs/faq.md |
Minor fix to the faq.md: it is version 10.2.7 and not 10.7.2 version of MariaDB |
Good catch @Dolphi2 - thanks for letting me know 👍 |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
I am creating a YunoHost package for the Kimai2. I am getting error while install. Can you please explain the cause?
Secondly how should be app upgrade from sources when the new version arrives? What folders are needed to be backed up along with .env and then restored to new source?
The text was updated successfully, but these errors were encountered: