SQLite Error when inserting new post
Closed this issue · 11 comments
Hello, I get the following error when trying to write a new blog post:
Error:
Object: object
Can you view the logs and see what the actual error is? Should have an exception thrown in the api/postcontroller
Hi, here is the full log
http://pastebin.com/ZcwC2TBz
table posts has no column named publish_date
Looks like maybe it didn't install properly. I would drop the db and install again.
Closing but please follow up if this doesn't fix it.
I can confirm, the problem is not fixed :
table posts has no column named publish_date
when trying to publish a new post.
Viewing the sqlite file, here is the posts table :
0|id|integer|0||1
1|title|varchar|0||0
2|slug|varchar|0||0
3|content|text|0||0
4|image|varchar|0||0
5|type|varchar|0||0
6|active|integer|0|'0'|0
7|created_at|datetime|0||0
8|updated_at|datetime|0||0
So yes, there's no publish_date field.
@grena Did you just install wardrobe? It appears I added that col on june 4th.
https://github.com/ericbarnes/wardrobe/blob/master/app/database/migrations/2013_05_31_140553_create_posts_table.php#L22
Does anything stand out to you that would cause that field to not be added when the migration is added?
Hello @ericbarnes,
Yes I just did a fresh install yesterday by cloning the repo. Here are the steps I did
git clone https://github.com/ericbarnes/wardrobe.git myproject && cd myproject
composer.phar install
**Here I changed app/config/database.php to switch to sqlite**
cd ..
chown -R www-data:www-data myproject
And I ran the installation.
Did I miss a step ?
Looks correct. I will do some testing and see whats up.
Sorry for spamming the thread :) I think I have it figured it out now. The default sqlite file wasn't empty from when I first started building the app. So the migration never ran since all the tables was already created.
Hi,
I just tested right now and it works, the bug is fixed :)
Thank you for your investigation !
Cheers.