Some checks are pending
Security Checks / security (push) Waiting to run
统一 frontend、backend、test、test-log 和 out 目录,更新构建、部署及测试入口;纳入配置管理兼容与首次安全引导修复;排除本机配置、密钥和测试产物。
20 lines
530 B
Go
20 lines
530 B
Go
package migration
|
|
|
|
import (
|
|
"context"
|
|
"fmt"
|
|
)
|
|
|
|
func applyIMAPDeletedFlagSchema(ctx context.Context, exec executor, dialect Dialect) error {
|
|
definitions := map[Dialect]string{
|
|
DialectSQLite: `INTEGER NOT NULL DEFAULT 0`,
|
|
DialectMySQL: `TINYINT NOT NULL DEFAULT 0`,
|
|
DialectPostgres: `SMALLINT NOT NULL DEFAULT 0`,
|
|
}
|
|
definition, ok := definitions[dialect]
|
|
if !ok {
|
|
return fmt.Errorf("unsupported migration dialect %q", dialect)
|
|
}
|
|
return ensureColumn(ctx, exec, dialect, "user_email", "is_deleted", definition)
|
|
}
|