Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

aerich generates two semicolons in a row #301

Open
neo31337 opened this issue May 11, 2023 · 3 comments
Open

aerich generates two semicolons in a row #301

neo31337 opened this issue May 11, 2023 · 3 comments

Comments

@neo31337
Copy link

neo31337 commented May 11, 2023

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

@long2ice
Copy link
Member

Just try latest code

@Serpong
Copy link

Serpong commented Jul 20, 2023

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

@long2ice
Copy link
Member

released v0.7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants