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

Clickhouse database Unknown column.type; There is no type named "Int64". Did you mean "UInt64" #2663

Closed
khanakia opened this issue Apr 4, 2024 · 0 comments

Comments

@khanakia
Copy link

khanakia commented Apr 4, 2024

This hcl gives error when I run atlas schema apply -u "clickhouse://localhost:9000/demo" -f clickhouse/schema.hcl

table "my_first_table" {
  schema = schema.demodb
  engine = MergeTree

  column "Int64" {
    null = false
    type = String
  }

  column "message" {
    null = false
    type = String
  }

  primary_key {
    columns = [column.id]
  }
}
Error: clickhouse/schema.hcl:167,12-17: Unknown column.type; There is no type named "Int64". Did you mean "UInt64"?
task: Failed to run task "atlas:migrate": exit status 1

But clickhouse does support Int64 column https://clickhouse.com/docs/en/sql-reference/data-types/int-uint
this query works fine

CREATE TABLE my_first_table
(
    user_id Int64,
    message String
)
ENGINE = MergeTree
PRIMARY KEY (user_id)
@khanakia khanakia closed this as completed Apr 4, 2024
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

1 participant