Skip to content
This repository was archived by the owner on Jan 28, 2021. It is now read-only.
This repository was archived by the owner on Jan 28, 2021. It is now read-only.

show create table returns incorrect type for varchar #844

Closed
@smacker

Description

@smacker

In gitbase we have for example refs table. In which column commit_hash is a VARCHAR(40) which was implemented here: src-d/gitbase#916

But the query

show create table refs

returns

CREATE TABLE `refs` (
  `repository_id` TEXT NOT NULL,
  `ref_name` TEXT NOT NULL,
  `commit_hash` VARCHAR NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4

I'm not sure if it's against mysql spec but at least sqlachemy fails to parse such schema with an error:

sqlalchemy.exc.CompileError: VARCHAR requires a length on dialect mysql

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions