mirror of
https://github.com/dolthub/dolt.git
synced 2026-01-06 00:39:40 -06:00
Merge branch 'angela/datetime' into angelamayxie-f6c4ebdf
This commit is contained in:
@@ -177,7 +177,7 @@ var logTableSchema = sql.Schema{
|
||||
&sql.Column{Name: "commit_hash", Type: types.Text},
|
||||
&sql.Column{Name: "committer", Type: types.Text},
|
||||
&sql.Column{Name: "email", Type: types.Text},
|
||||
&sql.Column{Name: "date", Type: types.Datetime},
|
||||
&sql.Column{Name: "date", Type: types.Datetime3},
|
||||
&sql.Column{Name: "message", Type: types.Text},
|
||||
&sql.Column{Name: "commit_order", Type: types.Uint64},
|
||||
}
|
||||
|
||||
@@ -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()},
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -235,7 +235,7 @@ func (bt *BranchesTable) Schema() sql.Schema {
|
||||
{Name: "hash", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: false, DatabaseSource: bt.db.Name()},
|
||||
{Name: "latest_committer", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()},
|
||||
{Name: "latest_committer_email", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()},
|
||||
{Name: "latest_commit_date", Type: types.Datetime, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()},
|
||||
{Name: "latest_commit_date", Type: types.Datetime3, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()},
|
||||
{Name: "latest_commit_message", Type: types.Text, Source: bt.tableName, PrimaryKey: false, Nullable: true, DatabaseSource: bt.db.Name()},
|
||||
}
|
||||
if !bt.remote {
|
||||
|
||||
@@ -76,7 +76,7 @@ func (ct *CommitsTable) Schema() sql.Schema {
|
||||
{Name: "commit_hash", Type: types.Text, Source: ct.tableName, PrimaryKey: true, DatabaseSource: ct.dbName},
|
||||
{Name: "committer", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName},
|
||||
{Name: "email", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName},
|
||||
{Name: "date", Type: types.Datetime, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName},
|
||||
{Name: "date", Type: types.Datetime3, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName},
|
||||
{Name: "message", Type: types.Text, Source: ct.tableName, PrimaryKey: false, DatabaseSource: ct.dbName},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ func (dt *LogTable) Schema() sql.Schema {
|
||||
{Name: "commit_hash", Type: types.Text, Source: dt.tableName, PrimaryKey: true, DatabaseSource: dt.dbName},
|
||||
{Name: "committer", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
{Name: "email", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
{Name: "date", Type: types.Datetime, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
{Name: "date", Type: types.Datetime3, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
{Name: "message", Type: types.Text, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
{Name: "commit_order", Type: types.Uint64, Source: dt.tableName, PrimaryKey: false, DatabaseSource: dt.dbName},
|
||||
}
|
||||
|
||||
@@ -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},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -5324,7 +5324,7 @@ var LogTableFunctionScriptTests = []queries.ScriptTest{
|
||||
{"commit_hash", "text", "NO", "PRI", nil, ""},
|
||||
{"committer", "text", "NO", "", nil, ""},
|
||||
{"email", "text", "NO", "", nil, ""},
|
||||
{"date", "datetime", "NO", "", nil, ""},
|
||||
{"date", "datetime(3)", "NO", "", nil, ""},
|
||||
{"message", "text", "NO", "", nil, ""},
|
||||
{"commit_order", "bigint unsigned", "NO", "", nil, ""},
|
||||
},
|
||||
|
||||
@@ -95,7 +95,7 @@ func (ht *HistoryTable) PrimaryKeySchema() sql.PrimaryKeySchema {
|
||||
&sql.Column{
|
||||
Name: CommitDateCol,
|
||||
Source: tableName,
|
||||
Type: types.Datetime,
|
||||
Type: types.Datetime3,
|
||||
},
|
||||
)
|
||||
return newSch
|
||||
@@ -209,7 +209,7 @@ func historyTableSchema(tableName string, table *DoltTable) sql.Schema {
|
||||
&sql.Column{
|
||||
Name: CommitDateCol,
|
||||
Source: tableName,
|
||||
Type: types.Datetime,
|
||||
Type: types.Datetime3,
|
||||
},
|
||||
)
|
||||
return newSch
|
||||
@@ -409,7 +409,7 @@ func (ht *HistoryTable) Schema() sql.Schema {
|
||||
projectedSch[i] = &sql.Column{
|
||||
Name: CommitDateCol,
|
||||
Source: ht.Name(),
|
||||
Type: types.Datetime,
|
||||
Type: types.Datetime3,
|
||||
}
|
||||
} else {
|
||||
panic("column not found")
|
||||
|
||||
@@ -759,7 +759,7 @@ func BasicSelectTests() []SelectTest {
|
||||
&sql.Column{Name: "commit_hash", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "committer", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "email", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "date", Type: gmstypes.Datetime},
|
||||
&sql.Column{Name: "date", Type: gmstypes.Datetime3},
|
||||
&sql.Column{Name: "message", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "commit_order", Type: gmstypes.Uint64},
|
||||
},
|
||||
@@ -793,7 +793,7 @@ func BasicSelectTests() []SelectTest {
|
||||
&sql.Column{Name: "hash", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "latest_committer", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "latest_committer_email", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "latest_commit_date", Type: gmstypes.Datetime},
|
||||
&sql.Column{Name: "latest_commit_date", Type: gmstypes.Datetime3},
|
||||
&sql.Column{Name: "latest_commit_message", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "remote", Type: gmstypes.Text},
|
||||
&sql.Column{Name: "branch", Type: gmstypes.Text},
|
||||
|
||||
Reference in New Issue
Block a user