Perl-Evozon/PearlBee

Database setup fails

Closed this issue · 2 comments

Setting up the database as per the README leads to the following error when plackup's web server receives a request:

[PearlBee:20246] error @2015-05-04 00:40:12> Exception caught in 'core.app.before_request' filter: Hook error: DBIx::Class::ResultSet::first(): DBI Exception: DBD::mysql::st execute failed: Unknown column 'me.multiuser' in 'field list' [for Statement "SELECT me.timezone, me.social_media, me.blog_path, me.theme_folder, me.blog_name, me.multiuser, me.id FROM settings me"] at /var/www/blog.towiski.de/PearlBee/bin/../lib/PearlBee.pm line 46

Running mysql -u root -DPearlBee < db_patches/set_up_new_db.sql fixes it. The (manually maintained, I suppose) create_tables.sql script seems to be out of date and missing at least these two lines:
multiuser TINYINT(1) NOT NULL DEFAULT '0',
id INTEGER NOT NULL PRIMARY KEY

On 5/5/2015 1:14 AM, Matthias Bethke wrote:

Setting up the database as per the README leads to the following error
when plackup's web server receives a request:

|[PearlBee:20246] error @2015-05-04 00:40:12> Exception caught in
'core.app.before_request' filter: Hook error:
DBIx::Class::ResultSet::first(): DBI Exception: DBD::mysql::st execute
failed: Unknown column 'me.multiuser' in 'field list' [for Statement
"SELECT me.timezone, me.social_media, me.blog_path, me.theme_folder,
me.blog_name, me.multiuser, me.id FROM settings me"] at
/var/www/blog.towiski.de/PearlBee/bin/../lib/PearlBee.pm line 46|

Running |mysql -u root -DPearlBee < db_patches/set_up_new_db.sql|
fixes it. The (manually maintained, I suppose) create_tables.sql
script seems to be out of date and missing at least these two lines:
|multiuser TINYINT(1) NOT NULL DEFAULT '0',|
|id INTEGER NOT NULL PRIMARY KEY|


Reply to this email directly or view it on GitHub
#34.

Hello,
I just updated that. The intention was to replace create_tables.sql with
set_up_new_db.sql, but the README file was not updated. Now it should
work using any of the scripts.

Best regards,
Florin Mesaros

Cool, thanks for the quick fix!