Skip to content

Commit 909c41a

Browse files
committed
setup test
1 parent ef50b06 commit 909c41a

File tree

2 files changed

+22
-7
lines changed

2 files changed

+22
-7
lines changed

components/usage/pkg/db/team.go

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,17 @@ import (
99
)
1010

1111
type Team struct {
12-
ID string `gorm:"primary_key;column:id;type:char;size:36;" json:"id"`
13-
Name string `gorm:"column:name;type:varchar;size:255;" json:"name"`
14-
Slug string `gorm:"column:slug;type:varchar;size:255;" json:"slug"`
15-
CreationTime string `gorm:"column:creationTime;type:varchar;size:255;" json:"creation_time"`
16-
Deleted int32 `gorm:"column:deleted;type:tinyint;default:0;" json:"deleted"`
17-
LastModified time.Time `gorm:"column:_lastModified;type:timestamp;default:CURRENT_TIMESTAMP(6);" json:"_last_modified"`
18-
MarkedDeleted int32 `gorm:"column:markedDeleted;type:tinyint;default:0;" json:"marked_deleted"`
12+
ID string `gorm:"primary_key;column:id;type:char;size:36;" json:"id"`
13+
Name string `gorm:"column:name;type:varchar;size:255;" json:"name"`
14+
Slug string `gorm:"column:slug;type:varchar;size:255;" json:"slug"`
15+
16+
CreationTime VarcharTime `gorm:"column:creationTime;type:varchar;size:255;" json:"creation_time"`
17+
LastModified time.Time `gorm:"column:_lastModified;type:timestamp;default:CURRENT_TIMESTAMP(6);" json:"_last_modified"`
18+
19+
MarkedDeleted int32 `gorm:"column:markedDeleted;type:tinyint;default:0;" json:"marked_deleted"`
20+
21+
// deleted is reserved for use by db-sync.
22+
_ int32 `gorm:"column:deleted;type:tinyint;default:0;" json:"deleted"`
1923
}
2024

2125
// TableName sets the insert table name for this struct type

components/usage/pkg/db/team_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
// Copyright (c) 2022 Gitpod GmbH. All rights reserved.
2+
// Licensed under the GNU Affero General Public License (AGPL).
3+
// See License-AGPL.txt in the project root for license information.
4+
5+
package db_test
6+
7+
import "testing"
8+
9+
func TestTeam_ReadFromExistingData(t *testing.T) {
10+
11+
}

0 commit comments

Comments
 (0)