It is not prefix, it is database.table notation. I had similar error when I forgot to import db. But then the error was regarding forum.config
. I have no table named settings in my db, because I am installing it from beta.2.
Upgrade + move flarum
And I cannot install beta3 with command:
composer.phar create-project flarum/flarum:v0.1.0-beta-3 . --stability=beta
because I am getting error:
Failed to clone https://github.com/flarum/composer-installer.git via https, ssh protocols, aborting.
hum, try to install directly beta6.
Ok, but how can I import all the data from beta.2? Is it possible?
I understand it does not exist, but maybe there is another way? maybe there is fe. 5 tables to copy or so? I would not like to move it table-by-table and check if something breaks. Are you sure there is no option to upgrade forum from beta.2?
what do you mean by indeed rename table config by settings
?
- Edited
adasiek Moving flarum worked fine, but after updating to newer version I got an error in nginx error log:
Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'forum.settings' doesn't exist' in /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php:319
adasiek what do you mean by indeed rename table config by settings?
Because in the next version the name of table config change for settings.
So, I think you have to be the only one in this situation...
Me, I will try to install version 6 in this order :
- backup my current flarum beta2
- disable all extensions
- Install beta6 with composer
- create file config.php
- Navigate to yourforum.com/admin and with luck the page "upgrade" will be displayed
Attention, I do not know if it works
edit : I have doubts that this will work...
no, I'm pretty sure it doesn't, because of reasons it does not work now. when I am entering myforum.com/admin it expects me to have table settings. But when I am updating it expects me to have table config (to be precise, it expects I do not have table 'settings'). So, after installing beta.6 and switching database content to my beta.2 content, I will have the same problem.
I am out of ideas, to be honest.
And, just to make everything clear, here is the rest of stacktrace:
Uncaught exception 'PDOException' with message 'SQLSTATE[42S02]: Base table or view not found: 1146 Table 'forum.settings' doesn't exist' in /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php:319
value
Stack trace:
#0 /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php(319): PDO->prepare('select,...')
value
#1 /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php(655): Illuminate\Database\Connection->Illuminate\Database\{closure}(Object(Illuminate\Database\MySqlConnection), 'select,...', Array)
value
#2 /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php(618): Illuminate\Database\Connection->runQueryCallback('select,...', Array, Object(Closure))
value
#3 /usr/share/nginx/flarum/vendor/illuminate/database/Connection.php(324): Illuminate\Database\Connection->run('select,...', Array, Object(Closure))
#4 /usr/share/nginx/flarum/vendor/illuminate/database/Query/Builder.php(1431): Illuminate\Database\Connection->select
- Edited
Ok, perhaps with this procedure
- Disable all extensions. (If you've set a language other than English as the default language for your forum, be sure to set the default language back to English before disabling the language pack!)
- Back up your database, your config.php file, and your assets directory.
- Delete everything in your forum directory.
- Installation instructions for beta 6.
- Replace config.php and assets with your backups.
- Run the following queries on your database:
UPDATE `migrations` SET `extension` = CONCAT('flarum-', extension) WHERE `extension` IS NOT NULL; UPDATE `config` SET `key` = CONCAT('flarum-', `key`) WHERE `key` LIKE '%.%';
- run
rm -Rf assets/*.js assets/*.css storage/cache/* storage/formatter/* storage/views/*
- Visit yourforum.com/admin and enter your database password to perform the update.
- Re-enable extensions. After enabling the English language pack, you may need to delete assets/*.js if language strings are not showing up.
So you think removing assets and storage will help with this issue? Because this is the only difference between your procedure and what I did. The issue here is that some file in beta.6 relies on settings table and this file is used before migrating.
Ok, but I will try your solution tomorrow. Now I have to go to sleep after 4-hour long setting up nginx ?
Another thought: I'm not sure how these migrations work, but if it just takes file from directory 'migrations', runs it and saves its name into db, then maybe I could just remove this particular file, perform migrations and then manually insert this never-run migration into migrations table?
Is this a good idea?
Try running php flarum migrate
from ssh if you can't access admin because it's missing the settings table.
[deleted]
- Edited
adasiek i was at the same shoes as u when i had a beta 2 installation thag i needed to upgrade.... Unfortunately non of the auto-update methods seemed to work...
I had to install a fresh installation of flarum running the latest version and then post some test posts and added some test tags and i went into the database and compared each table and column one by one to the one of the old beta 2 forum and had to add any missing columns and rename whatever was renamed (including renaming the config table to the settings table) and then once i was done with all of that, i changed the version in the settings table to the latest and then i updated the flarum installation and everything worked perfectly! The update through the admin pannel doesn't work so the method I described above is the only way.
Also please refer to https://discuss.flarum.org/d/3772-upgrading-from-beta-2/
[deleted]
adasiek like all the steps to upgrade from beta 2 to beta 3 but skip the part where u have to go to yourdomain.com/admin since u already manually upgraded
Also what i keant by "i changed the version in the settings table" is
In the settings table (known as config in beta 2 but u have to rename it) there is a column stating which version of flarum the db was updated/installed in .... That's what makes the flarum installation determin if it needs to update the db or not.... We don't want that in this case so you have to edit that to say it's the latest version
Also want to add up that you should copy the migrations table from ur new flarum installation and import it to the one you're upgrading....this will help prevent issues i faced before
ok. seems really difficult ? but all right. Do you have, by any chance, list of this changes? I read migrations but they all aren't clear to me