CHARACTER SET COLLATE in MySQL and SQLAlchemy
I have a MySql table that has a column:
CREATE TABLE names(
`name` VARCHAR (100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_ci NOT NULL);
I am tryint to ma开发者_开发知识库p the following column to it in MySqlAlchemy,
class Names(Base):
__tablename__ = "folder"
name = Column(VARCHAR, collation='utf8mb4_unicode_ci',nullable = False)
and I am getting the following error:
TypeError: Additional arguments should be named <dialectname>_<argument>, got 'collation'
I tried searching around and found this but it's not working...
精彩评论