Open surad123 opened 5 months ago
Have you already installed and ran Open Report Parser (or a similar project) before attempting install of this? Per the Readme:
- A database that is pre-populated with data from Open Report Parser
I just ran into this too. Ubuntu. Open Report Parser installed. The issue is that CREATE VIEW IF NOT EXISTS doesn't seem to be a thing by looking at the MySQL documentation. I changed it to CREATE VIEW (because I knew it didn't exist) and ran install again, and everything worked.
I just ran into this too. Ubuntu. Open Report Parser installed. The issue is that CREATE VIEW IF NOT EXISTS doesn't seem to be a thing by looking at the MySQL documentation. I changed it to CREATE VIEW (because I knew it didn't exist) and ran install again, and everything worked.
Thanks for pointing this out - this will be reviewed.
I just ran into this too. Ubuntu. Open Report Parser installed. The issue is that CREATE VIEW IF NOT EXISTS doesn't seem to be a thing by looking at the MySQL documentation. I changed it to CREATE VIEW (because I knew it didn't exist) and ran install again, and everything worked.
It looks like your issue is different to OPs. OP is running MariaDB 10.3 which has support for 'IF NOT EXISTS' in 'CREATE VIEW' statements since MariaDB 10.1.3 released in 2015. See https://mariadb.com/kb/en/create-view/ and https://mariadb.com/kb/en/mariadb-10-1-3-release-notes for more info.
The MySQL v8.0 (and 5.7) documentation doesn't show support for 'IF NOT EXISTS' in 'CREATE VIEW'. See https://dev.mysql.com/doc/refman/8.0/en/create-view.html and https://dev.mysql.com/doc/refman/5.7/en/create-view.html.
There is shared support for 'OR REPLACE' in 'CREATE VIEW' statements in both MySQL and MariaDB. It could be used as an alternative to 'IF NOT EXISTS' to prevent SQL errors. This will obviously have the effect of overriding the view if it exists, but it should ensure consistency between both variants.
Describe the bug A clear and concise description of what the bug is.
To Reproduce Steps to reproduce the behavior:
Expected behavior sql will not execute
Software Version [x] Version 1
Desktop (please complete the following information):
Server (please complete the following information):