aerich
aerich copied to clipboard
aerich generates two semicolons in a row
async def upgrade(db: BaseDBAsyncClient) -> str:
return """
CREATE TABLE IF NOT EXISTS `languages` (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`name` VARCHAR(255) NOT NULL,
`code` VARCHAR(2) NOT NULL
) CHARACTER SET utf8mb4;;
CREATE TABLE IF NOT EXISTS `timezones` (
`id` INT NOT NULL PRIMARY KEY AUTO_INCREMENT,
`country_code` VARCHAR(2) NOT NULL,
`country_name` VARCHAR(255) NOT NULL,
`timezone` VARCHAR(255) NOT NULL,
`gmt_offset` VARCHAR(255) NOT NULL
) CHARACTER SET utf8mb4;;"""
tortoise.exceptions.OperationalError: (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 ';\n CREATE TABLE IF NOT EXISTS timezones (\n id INT NOT NULL PRIMARY' at line 1")
Just try latest code
I have same problem here. I found that this problem has fixed on #280 But latest released version is still 0.7.1 (Sep 27, 2022) 😭
released v0.7.2