Skip to content
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

Plugin Table Creation Error #42

Open
matthewblott opened this issue Sep 27, 2022 · 1 comment
Open

Plugin Table Creation Error #42

matthewblott opened this issue Sep 27, 2022 · 1 comment
Labels
help wanted Extra attention is needed

Comments

@matthewblott
Copy link

I've been using this project with the WP2Static static site generator plugin. It mostly works but one table isn't created when the plugin is activated. I thought it was an issue with the plugin itself using ANSI-SQL incompatible with SQLite but the other tables also use incompatible SQL successfully.

Unless I've misunderstood I assume wp-sqlite-db converts the MySQL dialect into SQLite compatible SQL. The following doesn't work for whatever reason:

CREATE TABLE wp_wp2static_log (
  id mediumint(9) NOT NULL AUTO_INCREMENT,
  time TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
  log TEXT NOT NULL,
  PRIMARY KEY  (id)
)

This only affects the log table so the plugin works. Obviously this is easy to change in the plugin itself but I'd prefer to get wp-sqlite-db's conversion process working correctly.

There is also a second issue with one of the log queries not running correctly (after I've manually created the table):

SELECT CONCAT_WS(': ', time, log) FROM wp_wp2static_log

Again, the above SQL is easily fixed but I'd prefer to make the alteration in wp-sqlite-db and convert the CONCAT_WS function correctly into something SQLite understands.

Any help appreciated :-)

@aaemnnosttv
Copy link
Owner

Thanks for raising!

Unless I've misunderstood I assume wp-sqlite-db converts the MySQL dialect into SQLite compatible SQL.

That's correct.

Again, the above SQL is easily fixed but I'd prefer to make the alteration in wp-sqlite-db and convert the CONCAT_WS function correctly into something SQLite understands.

Sounds like there is probably an error in the translation here. You might also try it again on the latest as there have been some updates that may help.

If there are any errors you're seeing in the debug log or other output please include those here as well.

@aaemnnosttv aaemnnosttv added the help wanted Extra attention is needed label Feb 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants