mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2026-11-13 07:19:18 +01:00
using consts; avoid test data in production binary
This commit is contained in:
1 parent
9b1919a8eb
commit
9f4d4e4559
10 files changed
+435
-223
No files matched your search
@@ -288,55 +288,3 @@ func (c *SchemaCatalog) GetDefaultPartitionCount() int32 {
|
||||
defer c.mu.RUnlock()
|
||||
return c.defaultPartitionCount
|
||||
}
|
||||
|
||||
// initSampleData populates the catalog with sample schema data for testing
|
||||
func (c *SchemaCatalog) initSampleData() {
|
||||
// Create sample databases and tables
|
||||
c.databases["default"] = &DatabaseInfo{
|
||||
Name: "default",
|
||||
Tables: map[string]*TableInfo{
|
||||
"user_events": {
|
||||
Name: "user_events",
|
||||
Columns: []ColumnInfo{
|
||||
{Name: "user_id", Type: "VARCHAR(100)", Nullable: true},
|
||||
{Name: "event_type", Type: "VARCHAR(50)", Nullable: true},
|
||||
{Name: "data", Type: "TEXT", Nullable: true},
|
||||
// System columns - hidden by default in SELECT *
|
||||
{Name: "_timestamp_ns", Type: "BIGINT", Nullable: false},
|
||||
{Name: "_key", Type: "VARCHAR(255)", Nullable: true},
|
||||
{Name: "_source", Type: "VARCHAR(50)", Nullable: false},
|
||||
},
|
||||
},
|
||||
"system_logs": {
|
||||
Name: "system_logs",
|
||||
Columns: []ColumnInfo{
|
||||
{Name: "level", Type: "VARCHAR(10)", Nullable: true},
|
||||
{Name: "message", Type: "TEXT", Nullable: true},
|
||||
{Name: "service", Type: "VARCHAR(50)", Nullable: true},
|
||||
// System columns
|
||||
{Name: "_timestamp_ns", Type: "BIGINT", Nullable: false},
|
||||
{Name: "_key", Type: "VARCHAR(255)", Nullable: true},
|
||||
{Name: "_source", Type: "VARCHAR(50)", Nullable: false},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
||||
c.databases["test"] = &DatabaseInfo{
|
||||
Name: "test",
|
||||
Tables: map[string]*TableInfo{
|
||||
"test-topic": {
|
||||
Name: "test-topic",
|
||||
Columns: []ColumnInfo{
|
||||
{Name: "id", Type: "INT", Nullable: true},
|
||||
{Name: "name", Type: "VARCHAR(100)", Nullable: true},
|
||||
{Name: "value", Type: "DOUBLE", Nullable: true},
|
||||
// System columns
|
||||
{Name: "_timestamp_ns", Type: "BIGINT", Nullable: false},
|
||||
{Name: "_key", Type: "VARCHAR(255)", Nullable: true},
|
||||
{Name: "_source", Type: "VARCHAR(50)", Nullable: false},
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user