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

broken db migration from 2021 #5203

Closed
2 tasks done
manicmarvin opened this issue Sep 17, 2024 · 2 comments
Closed
2 tasks done

broken db migration from 2021 #5203

manicmarvin opened this issue Sep 17, 2024 · 2 comments

Comments

@manicmarvin
Copy link

Attempted Debugging

  • I have read the debugging page

Searched GitHub Issues

  • I have searched GitHub for the issue.

Describe the Scenario

I have a very old version of bookstack that has not been updated for years, I am now unable to update it because there were clearly unresolved migration issues in some past upgrade in 2020 or 2021 that throw errors during migration.

on running php artisan migrate I get:


Migrating: 2020_09_27_210528_create_deletions_table
Migrated:  2020_09_27_210528_create_deletions_table (0.72 seconds)
Migrating: 2020_11_07_232321_simplify_activities_table
Migrated:  2020_11_07_232321_simplify_activities_table (1.36 seconds)
Migrating: 2020_12_30_173528_add_owned_by_field_to_entities
Migrated:  2020_12_30_173528_add_owned_by_field_to_entities (1.61 seconds)
Migrating: 2021_01_30_225441_add_settings_type_column
Migrated:  2021_01_30_225441_add_settings_type_column (0.13 seconds)
Migrating: 2021_03_08_215138_add_user_slug
Migrated:  2021_03_08_215138_add_user_slug (0.83 seconds)
Migrating: 2021_05_15_173110_create_favourites_table
Migrated:  2021_05_15_173110_create_favourites_table (0.44 seconds)
Migrating: 2021_06_30_173111_create_mfa_values_table
Migrated:  2021_06_30_173111_create_mfa_values_table (0.45 seconds)
Migrating: 2021_07_03_085038_add_mfa_enforced_to_roles_table
Migrated:  2021_07_03_085038_add_mfa_enforced_to_roles_table (0.15 seconds)
Migrating: 2021_08_28_161743_add_export_role_permission
Migrated:  2021_08_28_161743_add_export_role_permission (0.02 seconds)
Migrating: 2021_09_26_044614_add_activities_ip_column
Migrated:  2021_09_26_044614_add_activities_ip_column (0.13 seconds)

   Symfony\Component\Debug\Exception\FatalThrowableError  : Class 'AddIndexForUserIp' not found

  at /var/www/wiki.asia.apc.org/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php:453
    449|     public function resolve($file)
    450|     {
    451|         $class = Str::studly(implode('_', array_slice(explode('_', $file), 4)));
    452|
  > 453|         return new $class;
    454|     }
    455|
    456|     /**
    457|      * Get all of the migration files in a given path.

Exact BookStack Version

v0.30.4

Log Content

No response

Hosting Environment

Debian GNU/Linux 12 (bookworm)
PHP 7.4-fpm running, several versions installed upto 8.3
Mariadb: 10.11.6-MariaDB-0+deb12u1 Debian 12

@ssddanbrown
Copy link
Member

Hi @manicmarvin,
Before anything please ensure you have full system backups if possible and backups of your BookStack database and files.

Specifically how are you upgrading from v0.30.4? What exact steps have you performed in this operation?

@ssddanbrown
Copy link
Member

Since there's been no further follow up on this I'll go ahead and close it off.

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

No branches or pull requests

2 participants