[error] MySQL Strict Mode is not set for database connection 'default'

django 에서 migrate 명령시

MySQL Strict Mode is not set for database connection 'default'

라는 경고가 발생했다. 뭔진 모르지만 꺼림칙하다.

DATABASES = {
    'default': {
        ...
        'PORT': '3306',
        'OPTIONS': {
            'init_command': "SET sql_mode='STRICT_TRANS_TABLES'"
        }
    }
}

DATABASES 설정의 default 안에 OPTIONS를 추가하면 된다.

Subscribe to X세대 신입사원

Don’t miss out on the latest issues. Sign up now to get access to the library of members-only issues.
jamie@example.com
Subscribe
774-86-01972 cinnabar.3d@gmail.com