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

Bookstack install - Syntax error when updating database #5038

Open
JaeggerLegane opened this issue May 30, 2024 · 7 comments
Open

Bookstack install - Syntax error when updating database #5038

JaeggerLegane opened this issue May 30, 2024 · 7 comments
Labels

Comments

@JaeggerLegane
Copy link

Describe the Bug

I'm trying to install bookstack on a webbased host with the "Manual Installation" steps, outlined on the bookstack website:
https://www.bookstackapp.com/docs/admin/installation/

I've performed the first 7 steps but however get an error when trying to update the database with the "php artisan migrate" command.

I get the following error:
Capture

Could somebody help on how to resolve this?

Steps to Reproduce

  1. Open a terminal
  2. Cd to my installation directory
  3. Run the command "php artisan migrate"

Expected Behaviour

It should complete the php artisan migration.

Screenshots or Additional Context

Capture

Browser Details

Chrome

Exact BookStack Version

24.05.01

@JaeggerLegane JaeggerLegane changed the title Bookstack install - Syntax error when running Bookstack install - Syntax error when updating database May 30, 2024
@ssddanbrown
Copy link
Member

Hi @JaeggerLegane,
Can you detail the environment you're installing BookStack into (Operating System, database software & version/location etc...)

@JaeggerLegane
Copy link
Author

Hi @JaeggerLegane, Can you detail the environment you're installing BookStack into (Operating System, database software & version/location etc...)

Hello Dan,

Thanks for your reply.

Here are some details of my environment:

  • Shared host
  • Apache 2.4.59
  • MariaDB 10.5.25
  • OS = Linux
  • Web server = php 8.1.28

The error seems to point to script "2020_08_04_111754_drop_joint_permissions_id".
Do I need to update this script? If so, could you tell me what I would need to change?

Thanks in advance for your help

@ssddanbrown
Copy link
Member

Hi @JaeggerLegane,
You should not need to edit any app files, including that script.

The error shared would only really appear on subsequent php artisan migrate runs, after the first.
The real underlying issue would likely only have been seen on the original php artisan migrate run.
Ideally we need to see the error message thrown on the first command run.

If possible, and if there's no existing data to save in this instance, Could you delete all existing tables in the bookstack database then re-run the php artisan migrate step, being sure to record any errors that appear on first run.
Be careful if you share this database with any other applications, to ensure you only delete the tables for BookStack (always a good idea to backup the whole database if there's any risk of data).

@JaeggerLegane
Copy link
Author

Hi @JaeggerLegane, You should not need to edit any app files, including that script.

The error shared would only really appear on subsequent php artisan migrate runs, after the first. The real underlying issue would likely only have been seen on the original php artisan migrate run. Ideally we need to see the error message thrown on the first command run.

If possible, and if there's no existing data to save in this instance, Could you delete all existing tables in the bookstack database then re-run the php artisan migrate step, being sure to record any errors that appear on first run. Be careful if you share this database with any other applications, to ensure you only delete the tables for BookStack (always a good idea to backup the whole database if there's any risk of data).

Hello Dan,

Thanks for your response.
I've deleted all the underlying tables in the DB and reran the php artisan migrate command.

I'm getting an error again relating to the permissions id script but it's slightly different this time, see below:
image

Any ideas?

@ssddanbrown
Copy link
Member

Thanks for the information @JaeggerLegane.
I've seen this occur before when an older (now-non-default) database engine is used.
Does your shared hosting provider give any control/option/access for the default database engine in use? Or do you have access to change default database configuration options at all?

@JaeggerLegane
Copy link
Author

Thanks for the information @JaeggerLegane. I've seen this occur before when an older (now-non-default) database engine is used. Does your shared hosting provider give any control/option/access for the default database engine in use? Or do you have access to change default database configuration options at all?

I have considerable access to make changes to the DB engine myself yes. But for anything else I may need the webhost team, they are however pretty flexible on my requests.

What would you recommend that I change?

@ssddanbrown
Copy link
Member

@JaeggerLegane Do you have the ability to set the default_storage_engineoption? (Commonly done on non-shared systems via amy.conf` file)

If so, set that to default_storage_engine=InnoDB (which is usually the default).
Then restart the database, then re-attempt from an empty database.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

No branches or pull requests

2 participants