Update from 0.14.3 to 0.18.3 Unable to Open Pages #465

Closed
opened 2026-02-04 20:15:08 +03:00 by OVERLORD · 8 comments
Owner

Originally created by @tuaris on GitHub (Oct 9, 2017).

  • BookStack Version: 0.18.3
  • PHP Version: 7.0
  • MySQL Version: 5.6
Expected Behavior

Page should open/display

Current Behavior

Whoops, looks like something went wrong.
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'main.comments' doesn't exist
SQLSTATE[42S02]: Base table or view not found: 1146 Table 'main.comments' doesn't exist (SQL: select * from comments where comments.entity_id in (88) and comments.entity_type = BookStack\Page order by created_at asc)

Steps to Reproduce

Update from 0.14.3 to 0.18.3 using instructions at https://www.bookstackapp.com/docs/admin/updates/

Originally created by @tuaris on GitHub (Oct 9, 2017). * BookStack Version: 0.18.3 * PHP Version: 7.0 * MySQL Version: 5.6 ##### Expected Behavior Page should open/display ##### Current Behavior Whoops, looks like something went wrong. SQLSTATE[42S02]: Base table or view not found: 1146 Table 'main.comments' doesn't exist SQLSTATE[42S02]: Base table or view not found: 1146 Table 'main.comments' doesn't exist (SQL: select * from `comments` where `comments`.`entity_id` in (88) and `comments`.`entity_type` = BookStack\Page order by `created_at` asc) ##### Steps to Reproduce Update from 0.14.3 to 0.18.3 using instructions at https://www.bookstackapp.com/docs/admin/updates/
Author
Owner

@tuaris commented on GitHub (Oct 9, 2017):

I tried running php artisan migrate

**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes


                                                                                                                                                                                                                                            
  [Illuminate\Database\QueryException]                                                                                                                                                                                                      
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'search_terms' already exists (SQL: create table `search_terms` (`id` int unsigned not null auto_increment primary key, `term` varchar(200) not null, `entity_type` varch  
  ar(100) not null, `entity_id` int not null, `score` int not null) default character set utf8mb4 collate utf8mb4_unicode_ci)                                                                                                               
                                                                                                                                                                                                                                            

                                                                                                
  [PDOException]                                                                                
  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'search_terms' already exists  
@tuaris commented on GitHub (Oct 9, 2017): I tried running `php artisan migrate` ``` ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > yes [Illuminate\Database\QueryException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'search_terms' already exists (SQL: create table `search_terms` (`id` int unsigned not null auto_increment primary key, `term` varchar(200) not null, `entity_type` varch ar(100) not null, `entity_id` int not null, `score` int not null) default character set utf8mb4 collate utf8mb4_unicode_ci) [PDOException] SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'search_terms' already exists ```
Author
Owner

@tuaris commented on GitHub (Oct 9, 2017):

Looked further back in the logs and found this:

[2017-10-09 16:17:20] production.ERROR: PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:449
Stack trace:
#0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(449): PDOStatement->execute()
#1 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(640): Illuminate\Database\Connection->Illuminate\Database\{closure}('alter table `se...', Array)
#2 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(607): Illuminate\Database\Connection->runQueryCallback('alter table `se...', Array, Object(Closure))
#3 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(450): Illuminate\Database\Connection->run('alter table `se...', Array, Object(Closure))
#4 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(83): Illuminate\Database\Connection->statement('alter table `se...')
#5 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(239): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#6 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(164): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#7 /app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\Builder->create('search_terms', Object(Closure))
#8 /app/database/migrations/2017_03_19_091553_create_search_index_table.php(27): Illuminate\Support\Facades\Facade::__callStatic('create', Array)
#9 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(348): CreateSearchIndexTable->up()
#10 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(353): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#11 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(175): Illuminate\Database\Migrations\Migrator->runMigration(Object(CreateSearchIndexTable), 'up')
#12 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(146): Illuminate\Database\Migrations\Migrator->runUp('/app/database/m...', 3, false)
#13 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(95): Illuminate\Database\Migrations\Migrator->runPending(Array, Array)
#14 /app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(69): Illuminate\Database\Migrations\Migrator->run(Array, Array)
#15 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
#16 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(28): call_user_func_array(Array, Array)
#17 /app/vendor/laravel/framework/src/Illuminate/Support/helpers.php(912): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#18 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(86): value(Object(Closure))
#19 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#20 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(524): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#21 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#22 /app/vendor/symfony/console/Command/Command.php(262): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#23 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#24 /app/vendor/symfony/console/Application.php(826): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /app/vendor/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /app/vendor/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#28 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#29 {main}

Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. (SQL: alter table `search_terms` add index `search_terms_term_index`(`term`)) in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647
Stack trace:
#0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(607): Illuminate\Database\Connection->runQueryCallback('alter table `se...', Array, Object(Closure))
#1 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(450): Illuminate\Database\Connection->run('alter table `se...', Array, Object(Closure))
#2 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(83): Illuminate\Database\Connection->statement('alter table `se...')
#3 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(239): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar))
#4 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(164): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint))
#5 /app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\Builder->create('search_terms', Object(Closure))
#6 /app/database/migrations/2017_03_19_091553_create_search_index_table.php(27): Illuminate\Support\Facades\Facade::__callStatic('create', Array)
#7 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(348): CreateSearchIndexTable->up()
#8 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(353): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}()
#9 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(175): Illuminate\Database\Migrations\Migrator->runMigration(Object(CreateSearchIndexTable), 'up')
#10 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(146): Illuminate\Database\Migrations\Migrator->runUp('/app/database/m...', 3, false)
#11 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(95): Illuminate\Database\Migrations\Migrator->runPending(Array, Array)
#12 /app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(69): Illuminate\Database\Migrations\Migrator->run(Array, Array)
#13 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire()
#14 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(28): call_user_func_array(Array, Array)
#15 /app/vendor/laravel/framework/src/Illuminate/Support/helpers.php(912): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}()
#16 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(86): value(Object(Closure))
#17 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure))
#18 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(524): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL)
#19 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array)
#20 /app/vendor/symfony/console/Command/Command.php(262): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#21 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle))
#22 /app/vendor/symfony/console/Application.php(826): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#23 /app/vendor/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#24 /app/vendor/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#25 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#26 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#27 {main}  
@tuaris commented on GitHub (Oct 9, 2017): Looked further back in the logs and found this: ``` [2017-10-09 16:17:20] production.ERROR: PDOException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:449 Stack trace: #0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(449): PDOStatement->execute() #1 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(640): Illuminate\Database\Connection->Illuminate\Database\{closure}('alter table `se...', Array) #2 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(607): Illuminate\Database\Connection->runQueryCallback('alter table `se...', Array, Object(Closure)) #3 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(450): Illuminate\Database\Connection->run('alter table `se...', Array, Object(Closure)) #4 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(83): Illuminate\Database\Connection->statement('alter table `se...') #5 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(239): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar)) #6 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(164): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint)) #7 /app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\Builder->create('search_terms', Object(Closure)) #8 /app/database/migrations/2017_03_19_091553_create_search_index_table.php(27): Illuminate\Support\Facades\Facade::__callStatic('create', Array) #9 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(348): CreateSearchIndexTable->up() #10 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(353): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}() #11 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(175): Illuminate\Database\Migrations\Migrator->runMigration(Object(CreateSearchIndexTable), 'up') #12 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(146): Illuminate\Database\Migrations\Migrator->runUp('/app/database/m...', 3, false) #13 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(95): Illuminate\Database\Migrations\Migrator->runPending(Array, Array) #14 /app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(69): Illuminate\Database\Migrations\Migrator->run(Array, Array) #15 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire() #16 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(28): call_user_func_array(Array, Array) #17 /app/vendor/laravel/framework/src/Illuminate/Support/helpers.php(912): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #18 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(86): value(Object(Closure)) #19 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #20 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(524): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #21 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array) #22 /app/vendor/symfony/console/Command/Command.php(262): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #23 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #24 /app/vendor/symfony/console/Application.php(826): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 /app/vendor/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 /app/vendor/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #27 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #28 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #29 {main} Next Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. (SQL: alter table `search_terms` add index `search_terms_term_index`(`term`)) in /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php:647 Stack trace: #0 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(607): Illuminate\Database\Connection->runQueryCallback('alter table `se...', Array, Object(Closure)) #1 /app/vendor/laravel/framework/src/Illuminate/Database/Connection.php(450): Illuminate\Database\Connection->run('alter table `se...', Array, Object(Closure)) #2 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Blueprint.php(83): Illuminate\Database\Connection->statement('alter table `se...') #3 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(239): Illuminate\Database\Schema\Blueprint->build(Object(Illuminate\Database\MySqlConnection), Object(Illuminate\Database\Schema\Grammars\MySqlGrammar)) #4 /app/vendor/laravel/framework/src/Illuminate/Database/Schema/Builder.php(164): Illuminate\Database\Schema\Builder->build(Object(Illuminate\Database\Schema\Blueprint)) #5 /app/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(221): Illuminate\Database\Schema\Builder->create('search_terms', Object(Closure)) #6 /app/database/migrations/2017_03_19_091553_create_search_index_table.php(27): Illuminate\Support\Facades\Facade::__callStatic('create', Array) #7 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(348): CreateSearchIndexTable->up() #8 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(353): Illuminate\Database\Migrations\Migrator->Illuminate\Database\Migrations\{closure}() #9 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(175): Illuminate\Database\Migrations\Migrator->runMigration(Object(CreateSearchIndexTable), 'up') #10 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(146): Illuminate\Database\Migrations\Migrator->runUp('/app/database/m...', 3, false) #11 /app/vendor/laravel/framework/src/Illuminate/Database/Migrations/Migrator.php(95): Illuminate\Database\Migrations\Migrator->runPending(Array, Array) #12 /app/vendor/laravel/framework/src/Illuminate/Database/Console/Migrations/MigrateCommand.php(69): Illuminate\Database\Migrations\Migrator->run(Array, Array) #13 [internal function]: Illuminate\Database\Console\Migrations\MigrateCommand->fire() #14 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(28): call_user_func_array(Array, Array) #15 /app/vendor/laravel/framework/src/Illuminate/Support/helpers.php(912): Illuminate\Container\BoundMethod::Illuminate\Container\{closure}() #16 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(86): value(Object(Closure)) #17 /app/vendor/laravel/framework/src/Illuminate/Container/BoundMethod.php(30): Illuminate\Container\BoundMethod::callBoundMethod(Object(Illuminate\Foundation\Application), Array, Object(Closure)) #18 /app/vendor/laravel/framework/src/Illuminate/Container/Container.php(524): Illuminate\Container\BoundMethod::call(Object(Illuminate\Foundation\Application), Array, Array, NULL) #19 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(182): Illuminate\Container\Container->call(Array) #20 /app/vendor/symfony/console/Command/Command.php(262): Illuminate\Console\Command->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #21 /app/vendor/laravel/framework/src/Illuminate/Console/Command.php(167): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Illuminate\Console\OutputStyle)) #22 /app/vendor/symfony/console/Application.php(826): Illuminate\Console\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #23 /app/vendor/symfony/console/Application.php(189): Symfony\Component\Console\Application->doRunCommand(Object(Illuminate\Database\Console\Migrations\MigrateCommand), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #24 /app/vendor/symfony/console/Application.php(120): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #25 /app/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(123): Symfony\Component\Console\Application->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #26 /app/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput)) #27 {main} ```
Author
Owner

@tuaris commented on GitHub (Oct 9, 2017):

I see there was a bug for this filed already: #537

@tuaris commented on GitHub (Oct 9, 2017): I see there was a bug for this filed already: #537
Author
Owner

@Abijeet commented on GitHub (Oct 9, 2017):

I'm not entirely sure if this is related - UTF8mb4/Emoji Support - https://www.bookstackapp.com/docs/admin/ut8mb4-support/

I would rollback all the database changes, then re-run after following the steps there.

@Abijeet commented on GitHub (Oct 9, 2017): I'm not entirely sure if this is related - UTF8mb4/Emoji Support - https://www.bookstackapp.com/docs/admin/ut8mb4-support/ I would rollback all the database changes, then re-run after following the steps there.
Author
Owner

@Abijeet commented on GitHub (Oct 9, 2017):

@ssddanbrown - Found an issue with the blog post. Submitted a merge request here - https://github.com/BookStackApp/website/pull/15

@Abijeet commented on GitHub (Oct 9, 2017): @ssddanbrown - Found an issue with the blog post. Submitted a merge request here - https://github.com/BookStackApp/website/pull/15
Author
Owner

@tuaris commented on GitHub (Oct 9, 2017):

Restored the DB, ran the SQL generated by php artisan bookstack:db-utf8mb4 and got the "On ‘Key too long’ Error"

SQL Error (1709): Index column size too large. The maximum column size is 767 bytes. 

So I followed the steps in that section.

mysqldump -h database.internal -u main --no-create-info main > /tmp/bookstack_data.sql
DROP DATABASE `main`;
CREATE DATABASE `main`;
php artisan migrate
**************************************
*     Application In Production!     *
**************************************

 Do you really wish to run this command? (yes/no) [no]:
 > yes

Migration table created successfully.

                                                                                                                                                                                         
  [Illuminate\Database\QueryException]                                                                                                                                                   
  SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. (SQL: alter table `search_terms` add index `search_terms_term_index`(`term`))  
                                                                                                                                                                                         

                                                                                                           
  [PDOException]                                                                                           
  SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes.  
                                                                                                           
@tuaris commented on GitHub (Oct 9, 2017): Restored the DB, ran the SQL generated by `php artisan bookstack:db-utf8mb4` and got the "On ‘Key too long’ Error" ``` SQL Error (1709): Index column size too large. The maximum column size is 767 bytes. ``` So I followed the steps in that section. ``` mysqldump -h database.internal -u main --no-create-info main > /tmp/bookstack_data.sql ``` ``` DROP DATABASE `main`; CREATE DATABASE `main`; ``` ``` php artisan migrate ************************************** * Application In Production! * ************************************** Do you really wish to run this command? (yes/no) [no]: > yes Migration table created successfully. [Illuminate\Database\QueryException] SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. (SQL: alter table `search_terms` add index `search_terms_term_index`(`term`)) [PDOException] SQLSTATE[HY000]: General error: 1709 Index column size too large. The maximum column size is 767 bytes. ```
Author
Owner

@tuaris commented on GitHub (Oct 17, 2017):

Turns out that for MySQL < 5.7 and MariaDB < 10.2 you also need a ROW_FORMAT=DYNAMIC in the alter statement.
https://mariadb.com/kb/en/library/xtradbinnodb-storage-formats

@tuaris commented on GitHub (Oct 17, 2017): Turns out that for MySQL < 5.7 and MariaDB < 10.2 you also need a `ROW_FORMAT=DYNAMIC` in the alter statement. https://mariadb.com/kb/en/library/xtradbinnodb-storage-formats
Author
Owner

@ssddanbrown commented on GitHub (Sep 1, 2019):

I'm going to close this off now, Hopefully not many people are coming across this issue at this point. Thanks for posting your findings to help others!

@ssddanbrown commented on GitHub (Sep 1, 2019): I'm going to close this off now, Hopefully not many people are coming across this issue at this point. Thanks for posting your findings to help others!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#465