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

Error after CH upgrade from 2.6 to 2.7 #49

Open
Gamulator opened this issue Aug 4, 2022 · 3 comments
Open

Error after CH upgrade from 2.6 to 2.7 #49

Gamulator opened this issue Aug 4, 2022 · 3 comments
Labels

Comments

@Gamulator
Copy link

Hi.
While doing migrations (Symfony5) and perform table creation I get now:

HttpCode:500 ; ;Code: 36. DB::Exception: This syntax for *MergeTree engine is deprecated. Use extended storage definition syntax with ORDER BY/PRIMARY KEY clause.See
also allow_deprecated_syntax_for_merge_tree setting. (BAD_ARGUMENTS) (version 22.7.2.15 (official build))

@Gamulator
Copy link
Author

Works if create queries manually with new syntax:

    $this->connection->executeQuery("
            CREATE TABLE logs
            (
                `EventDate` Date DEFAULT today(),
                `id` UUID,
                `data` String,
                `createdAt` DateTime
            )
            ENGINE = ReplacingMergeTree
            ORDER BY (id)
            PARTITION BY toYYYYMM(EventDate)
            SETTINGS index_granularity = 8192
        ");

@asanikovich
Copy link
Member

@Gamulator please provide a repository with example of bug.

@gempir
Copy link

gempir commented Oct 13, 2023

I can reproduce the bug.

I use the ORM to generate a create statement for me.

CREATE TABLE offer_price_history (EventDate Date DEFAULT today(), id String, price Int32) ENGINE = ReplacingMergeTree(EventDate, (id), 8192);```

And it errors

This syntax for *MergeTree engine is deprecated. Use extended storage definition syntax with ORDER BY/PRIMARY KEY clause. See also `allow_deprecated_syntax_for_merge_tree` setting. (BAD_ARGUMENTS)
  IN:CREATE TABLE offer_price_history (EventDate Date DEFAULT today(), id String, price Int32) ENGINE = ReplacingMergeTree(EventDate, (id), 8192)

Clickhouse Version: (version 23.9.1.1854 (official build))

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

No branches or pull requests

3 participants