It took me a while to work around all errors so here is my detailed how-to for upgrading Flarum beta6 to 1.0.4:
0) backed up everyting (database and flarum directory)
1) My forums used old flagrow/upload not covered my migrations included in 1.0.4, so before everything else I upgraded it to the last version working on beta6:
composer require flagrow/upload:0.5.7
php flarum migrate
php flarum cache:clear
2) Disabled all non-core extensions (Flagrow Byoby, Flagrow Upload)
3) Exported old database using phpmyadmin (without CREATE DATABASE / USE statement), you can use mysqldump if you prefer
4) Moved all flarum files to directory flarum-old
5) Dropped all tables in the database using phpmyadmin
6) Made fresh install of Flarum 1.0.4 (composer create-project flarum/flarum
, changed public folder to flarum/public, etc, full guide here https://docs.flarum.org/install.html)
7) Accessed my newly installed forum, entered db credentials when finishing installation
8) When everything was finished, again dropped all tables in the database
9) Imported old data from step 3 into the database using phpmyadmin
10) Ran php flarum migrate
(Had to manually delete group_permision 2 viewDiscussion, otherwise there was an error — duplicate record with the same name)
11) Installed Upload: composer require fof/upload
12) Installed Byobu, latest beta: composer require fof/byobu:"*@beta"
13) Moved flarum-old/assets/files to flarum-new/public/assets/files
14) Moved flarum-old/assets/avatars to flarum-new/public/assets/avatars
15) Moved favicon and forum old to new location
16) Ran again
php flarum migrate
php flarum cache:clear
At this stage forum was almost working, with some errors (yours might be OK).
Media manager was giving errors, seems that it didn't like my old upload records not having UUID in the database so:
17) ran this sql command using phpmyadmin:
UPDATE `fof_upload_files` SET uuid=id WHERE uuid IS NULL;
For some reason several topics and replies had their closing tag </t> and </r> in the middle of the post and were failing to load, so had to correct that (move the closing tags to the very end using grep):
18) Exported posts
table using phpmyadmin
19) grep replaced </r>([^']+)', N
with \1</r>', N
20) grep replaced </t>([^']+)', N
with \1</t>', N
(probably could have done it in SQL but found it easier to work in text editor)
21) Truncated posts
table and imported the corrected .sql file from step 20
Everything was working at this point. My users found Byoby confusing though so:
22) Disabled Byobu and installed Whisper: composer require kyrne/whisper
That's it, hopefully it will help someone else trying to upgrade a very old Flarum installation!