追è¨
---
æ¬æ¥ã¯ã¯ãã£ã¡ã®ç´ãæ¹ã§ããã¾ã
Â
MySQLã使ã£ã¦ããæã«ããã¡ã¤ã«ã¸ã®ãã¹ã100æåè¶ ããã¨ã¨ã©ã¼ãèµ·ããããããã¯*FileField*ã®*max_length*ãæå®ããã°ç´ã [Django - Increase FileField length](https://stackoverflow.com/questions/26575635/django-increase-filefield-length)<br>
ã§ãããã®è¨äºã®å 容ã¯ãããã¡ããã¡ããè¦è¿ãã®ã§æ®ãã¦ãã
Â
ç°å¢
Djangoã®ãã¼ã¿ãã¼ã¹ã sqlite3 ãã MySQL ã«ç§»è¡ãããèµ·ããåé¡ã
Data too long for column 'hogehoge' at row 1
ããã¯ãªããªã®ãã¨ããã¨ããæ¡æ°ããµãã¦ããã¼ãã£ã¦MySQLãè¨ã£ã¦ãã
ã§ããªãã§ãããªãã¨ã«ãªã£ã¦ãããã¨ããã¨ãMySQLã®ããã©ã«ãã®è¨å®ããªã¼ãã¼ããã¼ãããã¨ã©ã¼ãè¿ãããã«ãªã£ã¦ãããããã ãããããå¤æ´ããã°ããã
ããã®ç´ãæ¹ã¯
$ sudo vim /etc/mysql/my.cnf
my.cnfã® [mysqld] ã«ãããæ¸ãå ãã
[mysqld] sql_mode=''
ãã¨ã¯åèµ·åããã°
$ sudo /etc/init.d/mysql restart
ããã§ç´ãã¾ããã
Â