[MM-57693] Add schema dump to Support Packet (#31162)
Co-authored-by: Claude <noreply@anthropic.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
824d3b8259
Коммит
04a60b6609
@@ -123,6 +123,37 @@ type SupportPacketPluginList struct {
|
||||
Disabled []Manifest `json:"disabled"`
|
||||
}
|
||||
|
||||
// SupportPacketDatabaseSchema contains the database schema information.
|
||||
// It is included in the Support Packet.
|
||||
type SupportPacketDatabaseSchema struct {
|
||||
DatabaseCollation string `yaml:"database_collation,omitempty"`
|
||||
DatabaseEncoding string `yaml:"database_encoding,omitempty"`
|
||||
Tables []DatabaseTable `yaml:"tables"`
|
||||
}
|
||||
|
||||
// DatabaseTable represents a table in the database schema.
|
||||
type DatabaseTable struct {
|
||||
Name string `yaml:"name"`
|
||||
Collation string `yaml:"collation,omitempty"`
|
||||
Options map[string]string `yaml:"options,omitempty"`
|
||||
Columns []DatabaseColumn `yaml:"columns"`
|
||||
Indexes []DatabaseIndex `yaml:"indexes,omitempty"`
|
||||
}
|
||||
|
||||
// DatabaseColumn represents a column in a database table.
|
||||
type DatabaseColumn struct {
|
||||
Name string `yaml:"name"`
|
||||
DataType string `yaml:"data_type"`
|
||||
MaxLength int64 `yaml:"max_length,omitempty"`
|
||||
IsNullable bool `yaml:"is_nullable"`
|
||||
}
|
||||
|
||||
// DatabaseIndex represents an index in a database table.
|
||||
type DatabaseIndex struct {
|
||||
Name string `yaml:"name"`
|
||||
Definition string `yaml:"definition"`
|
||||
}
|
||||
|
||||
type FileData struct {
|
||||
Filename string
|
||||
Body []byte
|
||||
|
||||
Ссылка в новой задаче
Block a user