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

Not support types of char and datetime #807

Closed
koolay opened this issue Aug 20, 2019 · 1 comment · Fixed by #823
Closed

Not support types of char and datetime #807

koolay opened this issue Aug 20, 2019 · 1 comment · Fixed by #823
Assignees
Labels
bug Something isn't working

Comments

@koolay
Copy link

koolay commented Aug 20, 2019

It is always failed when there is type char or type datetime in the sql of creating table.

time="2019-08-20T20:12:33+08:00" level=error msg="Error parsing auth server config: unexpected end of JSON input"
time="2019-08-20T20:12:33+08:00" level=info msg="log: Error 1105: unknown error: Type not supported: CHAR\n"
conn, _ := sqlx.Open("mysql", "root:dev@(127.0.0.1:3306)/mydb")
_, err := conn.Exec(sql)
if err != nil {
	log.Fatal(err)
}

sql:

CREATE TABLE `mytable` (
  `id` char(36) NOT NULL,
  `title` varchar(255) NOT NULL COMMENT '',
  `export_id` varchar(36) NOT NULL COMMENT ' id',
  `description` varchar(1024) DEFAULT NULL,
  `source_project` varchar(255) NOT NULL COMMENT '',
  `source_url` text NOT NULL COMMENT '',
  `dest_projects` text NOT NULL COMMENT '',
  `failed_projects` text COMMENT '',
  `is_all_projects` int DEFAULT '0' COMMENT '',
  `is_deleted` int NOT NULL DEFAULT '0' COMMENT '',
  `status` varchar(10)  COMMENT '',
  `result` text COMMENT '',
  `completed_on` datetime DEFAULT NULL COMMENT '',
  `created_on` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '',
  `created_by` varchar(36) DEFAULT NULL COMMENT 'Id',
  `modified_on` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '',
  `modified_by` varchar(36) DEFAULT NULL COMMENT 'Id',
  `distribute_type` int DEFAULT '0' COMMENT ' '
)
@ajnavarro
Copy link
Contributor

we'll have a look. Thanks!

@ajnavarro ajnavarro added the bug Something isn't working label Aug 21, 2019
@agarciamontoro agarciamontoro self-assigned this Sep 13, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants