What is the latest migration of bookstack's database? #2008

Closed
opened 2026-02-05 02:27:10 +03:00 by OVERLORD · 3 comments
Owner

Originally created by @nickolasdeluca on GitHub (Jan 4, 2021).

I'm having some issues updating my bookstack installation.

I'm running v0.30.3 and trying to update to v0.31.0.

After fixing all the issues related related to the files in bookstack's installation folder, caused by an outdated composer, I ran php artisan migrate and received this issue:

SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'template' (SQL: alter table `pages` add `template` tinyint(1) not null default '0')

Now, I remember manually adding this field at least 6 months ago following an issue posted here... so I rolled back my database, dropped that field and tried to migrate again, it returned another issue, related to the user_invites table.

I'm pretty sure that my database has less migration records than it should be.

This is the last record of the migrations table:

41 | 2018_08_04_115700_create_bookshelves_table | 1

Now, I humbly ask what is the latest migration?
Also, can I have the sql file of the remaining migrations so that I could run them manually and fix my database?
Restarting from scratch is impossible for us since we have a lot of stuff in this database.

Originally created by @nickolasdeluca on GitHub (Jan 4, 2021). I'm having some issues updating my bookstack installation. I'm running v0.30.3 and trying to update to v0.31.0. After fixing all the issues related related to the files in bookstack's installation folder, caused by an outdated composer, I ran `php artisan migrate` and received this issue: ``` SQLSTATE[42S21]: Column already exists: 1060 Duplicate column name 'template' (SQL: alter table `pages` add `template` tinyint(1) not null default '0') ``` Now, I remember manually adding this field at least 6 months ago following an issue posted here... so I rolled back my database, dropped that field and tried to migrate again, it returned another issue, related to the `user_invites` table. I'm pretty sure that my database has less migration records than it should be. This is the last record of the migrations table: ``` 41 | 2018_08_04_115700_create_bookshelves_table | 1 ``` Now, I humbly ask what is the latest migration? Also, can I have the sql file of the remaining migrations so that I could run them manually and fix my database? Restarting from scratch is impossible for us since we have a lot of stuff in this database.
Author
Owner

@ssddanbrown commented on GitHub (Jan 5, 2021):

Hi @nickolasdeluca,
A list of migrations can be seen here:
https://github.com/BookStackApp/BookStack/tree/release/database/migrations

If you're sure your database was correct as of v0.30.3 you can see the migration list at the point of that release via this link:
https://github.com/BookStackApp/BookStack/tree/v0.30.3/database/migrations

@ssddanbrown commented on GitHub (Jan 5, 2021): Hi @nickolasdeluca, A list of migrations can be seen here: https://github.com/BookStackApp/BookStack/tree/release/database/migrations If you're sure your database was correct as of v0.30.3 you can see the migration list at the point of that release via this link: https://github.com/BookStackApp/BookStack/tree/v0.30.3/database/migrations
Author
Owner

@nickolasdeluca commented on GitHub (Jan 5, 2021):

Hi @nickolasdeluca,
A list of migrations can be seen here:
https://github.com/BookStackApp/BookStack/tree/release/database/migrations

If you're sure your database was correct as of v0.30.3 you can see the migration list at the point of that release via this link:
https://github.com/BookStackApp/BookStack/tree/v0.30.3/database/migrations

This was exactly what I needed, I finally managed to update bookstack properly, no errors at all!
I was missing two entries in the migrations table.

Thanks for the support!

@nickolasdeluca commented on GitHub (Jan 5, 2021): > Hi @nickolasdeluca, > A list of migrations can be seen here: > https://github.com/BookStackApp/BookStack/tree/release/database/migrations > > If you're sure your database was correct as of v0.30.3 you can see the migration list at the point of that release via this link: > https://github.com/BookStackApp/BookStack/tree/v0.30.3/database/migrations This was exactly what I needed, I finally managed to update bookstack properly, no errors at all! I was missing two entries in the migrations table. Thanks for the support!
Author
Owner

@ssddanbrown commented on GitHub (Jan 5, 2021):

@nickolasdeluca Awesome, happy to hear you got things working!

@ssddanbrown commented on GitHub (Jan 5, 2021): @nickolasdeluca Awesome, happy to hear you got things working!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#2008