@@ -6,23 +6,23 @@ func addUserMigrations(mg *Migrator) {
6
6
userV1 := Table {
7
7
Name : "user" ,
8
8
Columns : []* Column {
9
- & Column {Name : "id" , Type : DB_BigInt , IsPrimaryKey : true , IsAutoIncrement : true },
10
- & Column {Name : "version" , Type : DB_Int , Nullable : false },
11
- & Column {Name : "login" , Type : DB_NVarchar , Length : 255 , Nullable : false },
12
- & Column {Name : "email" , Type : DB_NVarchar , Length : 255 , Nullable : false },
13
- & Column {Name : "name" , Type : DB_NVarchar , Length : 255 , Nullable : true },
14
- & Column {Name : "password" , Type : DB_NVarchar , Length : 255 , Nullable : true },
15
- & Column {Name : "salt" , Type : DB_NVarchar , Length : 50 , Nullable : true },
16
- & Column {Name : "rands" , Type : DB_NVarchar , Length : 50 , Nullable : true },
17
- & Column {Name : "company" , Type : DB_NVarchar , Length : 255 , Nullable : true },
18
- & Column {Name : "account_id" , Type : DB_BigInt , Nullable : false },
19
- & Column {Name : "is_admin" , Type : DB_Bool , Nullable : false },
20
- & Column {Name : "created" , Type : DB_DateTime , Nullable : false },
21
- & Column {Name : "updated" , Type : DB_DateTime , Nullable : false },
9
+ {Name : "id" , Type : DB_BigInt , IsPrimaryKey : true , IsAutoIncrement : true },
10
+ {Name : "version" , Type : DB_Int , Nullable : false },
11
+ {Name : "login" , Type : DB_NVarchar , Length : 255 , Nullable : false },
12
+ {Name : "email" , Type : DB_NVarchar , Length : 255 , Nullable : false },
13
+ {Name : "name" , Type : DB_NVarchar , Length : 255 , Nullable : true },
14
+ {Name : "password" , Type : DB_NVarchar , Length : 255 , Nullable : true },
15
+ {Name : "salt" , Type : DB_NVarchar , Length : 50 , Nullable : true },
16
+ {Name : "rands" , Type : DB_NVarchar , Length : 50 , Nullable : true },
17
+ {Name : "company" , Type : DB_NVarchar , Length : 255 , Nullable : true },
18
+ {Name : "account_id" , Type : DB_BigInt , Nullable : false },
19
+ {Name : "is_admin" , Type : DB_Bool , Nullable : false },
20
+ {Name : "created" , Type : DB_DateTime , Nullable : false },
21
+ {Name : "updated" , Type : DB_DateTime , Nullable : false },
22
22
},
23
23
Indices : []* Index {
24
- & Index {Cols : []string {"login" }, Type : UniqueIndex },
25
- & Index {Cols : []string {"email" }, Type : UniqueIndex },
24
+ {Cols : []string {"login" }, Type : UniqueIndex },
25
+ {Cols : []string {"email" }, Type : UniqueIndex },
26
26
},
27
27
}
28
28
@@ -45,25 +45,25 @@ func addUserMigrations(mg *Migrator) {
45
45
userV2 := Table {
46
46
Name : "user" ,
47
47
Columns : []* Column {
48
- & Column {Name : "id" , Type : DB_BigInt , IsPrimaryKey : true , IsAutoIncrement : true },
49
- & Column {Name : "version" , Type : DB_Int , Nullable : false },
50
- & Column {Name : "login" , Type : DB_NVarchar , Length : 255 , Nullable : false },
51
- & Column {Name : "email" , Type : DB_NVarchar , Length : 255 , Nullable : false },
52
- & Column {Name : "name" , Type : DB_NVarchar , Length : 255 , Nullable : true },
53
- & Column {Name : "password" , Type : DB_NVarchar , Length : 255 , Nullable : true },
54
- & Column {Name : "salt" , Type : DB_NVarchar , Length : 50 , Nullable : true },
55
- & Column {Name : "rands" , Type : DB_NVarchar , Length : 50 , Nullable : true },
56
- & Column {Name : "company" , Type : DB_NVarchar , Length : 255 , Nullable : true },
57
- & Column {Name : "org_id" , Type : DB_BigInt , Nullable : false },
58
- & Column {Name : "is_admin" , Type : DB_Bool , Nullable : false },
59
- & Column {Name : "email_verified" , Type : DB_Bool , Nullable : true },
60
- & Column {Name : "theme" , Type : DB_NVarchar , Length : 255 , Nullable : true },
61
- & Column {Name : "created" , Type : DB_DateTime , Nullable : false },
62
- & Column {Name : "updated" , Type : DB_DateTime , Nullable : false },
48
+ {Name : "id" , Type : DB_BigInt , IsPrimaryKey : true , IsAutoIncrement : true },
49
+ {Name : "version" , Type : DB_Int , Nullable : false },
50
+ {Name : "login" , Type : DB_NVarchar , Length : 255 , Nullable : false },
51
+ {Name : "email" , Type : DB_NVarchar , Length : 255 , Nullable : false },
52
+ {Name : "name" , Type : DB_NVarchar , Length : 255 , Nullable : true },
53
+ {Name : "password" , Type : DB_NVarchar , Length : 255 , Nullable : true },
54
+ {Name : "salt" , Type : DB_NVarchar , Length : 50 , Nullable : true },
55
+ {Name : "rands" , Type : DB_NVarchar , Length : 50 , Nullable : true },
56
+ {Name : "company" , Type : DB_NVarchar , Length : 255 , Nullable : true },
57
+ {Name : "org_id" , Type : DB_BigInt , Nullable : false },
58
+ {Name : "is_admin" , Type : DB_Bool , Nullable : false },
59
+ {Name : "email_verified" , Type : DB_Bool , Nullable : true },
60
+ {Name : "theme" , Type : DB_NVarchar , Length : 255 , Nullable : true },
61
+ {Name : "created" , Type : DB_DateTime , Nullable : false },
62
+ {Name : "updated" , Type : DB_DateTime , Nullable : false },
63
63
},
64
64
Indices : []* Index {
65
- & Index {Cols : []string {"login" }, Type : UniqueIndex },
66
- & Index {Cols : []string {"email" }, Type : UniqueIndex },
65
+ {Cols : []string {"login" }, Type : UniqueIndex },
66
+ {Cols : []string {"email" }, Type : UniqueIndex },
67
67
},
68
68
}
69
69
0 commit comments