Update token length and upper case the sql key words

Signed-off-by: wang yan <wangyan@vmware.com>
This commit is contained in:
wang yan 2019-01-09 09:40:17 +08:00
parent 362a0638d0
commit db09f9f101
2 changed files with 6 additions and 3 deletions

View File

@ -1,7 +1,10 @@
create table robot ( CREATE TABLE robot (
id SERIAL PRIMARY KEY NOT NULL, id SERIAL PRIMARY KEY NOT NULL,
name varchar(255), name varchar(255),
token varchar(4096), /*
The maximum length of token is 7k
*/
token varchar(7168),
description varchar(1024), description varchar(1024),
project_id int, project_id int,
disabled boolean DEFAULT false NOT NULL, disabled boolean DEFAULT false NOT NULL,

View File

@ -23,7 +23,7 @@ const RobotTable = "robot"
// Robot holds the details of a robot. // Robot holds the details of a robot.
type Robot struct { type Robot struct {
ID int `orm:"pk;auto;column(id)" json:"id"` ID int64 `orm:"pk;auto;column(id)" json:"id"`
Name string `orm:"column(name)" json:"name"` Name string `orm:"column(name)" json:"name"`
Token string `orm:"column(token)" json:"token"` Token string `orm:"column(token)" json:"token"`
Description string `orm:"column(description)" json:"description"` Description string `orm:"column(description)" json:"description"`