aerich icon indicating copy to clipboard operation
aerich copied to clipboard

aerich generates two semicolons in a row

Open neo31337 opened this issue 2 years ago • 3 comments

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")

neo31337 avatar May 11 '23 16:05 neo31337

Just try latest code

long2ice avatar May 12 '23 06:05 long2ice

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) 😭

Serpong avatar Jul 20 '23 05:07 Serpong

released v0.7.2

long2ice avatar Jul 20 '23 09:07 long2ice