Django / db-apiに組み込まれている文字列の大文字と小文字の区別を使用したいと思っていましたが、create database
コマンドでは機能しないようです。
from django.db import connections
cursor = connections['dbadmin'].cursor()
cursor.execute('create database %s', ['foo'])
失敗する
DatabaseError: (1064, "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ''foo'' at line 1")
ストレートですが、パラメータ化されていないものは問題なくcreate database foo
動作します。
それは私にはバグのように見えますよね? drop database
同様の問題があります...