update datetime precision for tags and branch activity

This commit is contained in:
angelamayxie
2025-12-04 14:31:47 -08:00
parent a44000fb3d
commit e896f3515b
2 changed files with 4 additions and 4 deletions

View File

@@ -50,10 +50,10 @@ func (bat *BranchActivityTable) String() string {
func (bat *BranchActivityTable) Schema() sql.Schema {
return []*sql.Column{
{Name: "branch", Type: types.Text, Source: bat.tableName, PrimaryKey: true, Nullable: false, DatabaseSource: bat.db.Name()},
{Name: "last_read", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()},
{Name: "last_write", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()},
{Name: "last_read", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()},
{Name: "last_write", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bat.db.Name()},
{Name: "active_sessions", Type: types.Int32, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()},
{Name: "system_start_time", Type: types.Datetime, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()},
{Name: "system_start_time", Type: types.DatetimeMaxPrecision, Source: bat.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bat.db.Name()},
}
}

View File

@@ -71,7 +71,7 @@ func (tt *TagsTable) Schema() sql.Schema {
{Name: "tag_hash", Type: types.Text, Source: tt.tableName, PrimaryKey: true},
{Name: "tagger", Type: types.Text, Source: tt.tableName, PrimaryKey: false},
{Name: "email", Type: types.Text, Source: tt.tableName, PrimaryKey: false},
{Name: "date", Type: types.Datetime, Source: tt.tableName, PrimaryKey: false},
{Name: "date", Type: types.Datetime3, Source: tt.tableName, PrimaryKey: false},
{Name: "message", Type: types.Text, Source: tt.tableName, PrimaryKey: false},
}
}