Perl-Evozon / PearlBee

116 stars 44 forks source link

Database setup fails #34

Closed mbethke closed 9 years ago

mbethke commented 9 years ago

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

MeSeFM commented 9 years ago

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 https://github.com/Perl-Evozon/PearlBee/issues/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

mbethke commented 9 years ago

Cool, thanks for the quick fix!