gergo85/oc-news

Data too long for column 'title' at row 1 (SQL: insert into `indikator_news_posts...)

Closed this issue · 1 comments

Hello,
I am migrating old articles from my old website and the articles titles are quite long over 120 characters so I am hitting the title character limit. Is there any possibility to increase the title limit?

Been searching the web and there seem to be some solution but don't feel like modifying the database directly... https://stackoverflow.com/questions/51918416/october-cms-data-too-long-for-column-content-at-row-1

I removed some text from this error log but you can test creating articles with titles over 120 characters
"SQLSTATE[22001]: String data, right truncated: 1406 Data too long for column 'title' at row 1 (SQL: insert into `indikator_news_posts` (`user_id`, `title`, `slug`, `category_id`, `tags`, `introductory`, `content`, `image`, `published_at`, `status`, `featured`, `updated_at`, `created_at`) values (0, TEXT, TEXT, 2, TAGS, <p>TEXT</p>, <p>TEXT</p>, , 2010-06-17 09:00:00, 1, 2, 2020-08-21 10:22:40, 2020-08-21 10:22:40))" on line 664 of /var/www/o/vendor/laravel/framework/src/Illuminate/Database/Connection.php

Hello,
Yes, it is possible. Change the 'title' and 'slug' columns size to 191 from 100 in the 'indikator_news_posts' table.