docs: add ui page testing checklist
This commit is contained in:
@@ -48,6 +48,39 @@ type Service struct {
|
||||
func Serve(cmd *cobra.Command, args []string) error {
|
||||
return container.Container.Invoke(func(ctx context.Context, svc Service) error {
|
||||
models.SetDefault(svc.DB)
|
||||
fmt.Println("Cleaning existing data...")
|
||||
|
||||
truncateTables := []string{
|
||||
"user_content_actions",
|
||||
"comments",
|
||||
"content_reports",
|
||||
"audit_logs",
|
||||
"system_configs",
|
||||
"notification_templates",
|
||||
"notifications",
|
||||
"tenant_invites",
|
||||
"tenant_join_requests",
|
||||
"content_access",
|
||||
"order_items",
|
||||
"orders",
|
||||
"user_coupons",
|
||||
"coupons",
|
||||
"content_assets",
|
||||
"media_assets",
|
||||
"content_prices",
|
||||
"contents",
|
||||
"tenant_users",
|
||||
"tenants",
|
||||
"payout_accounts",
|
||||
"tenant_ledgers",
|
||||
"users",
|
||||
}
|
||||
for _, table := range truncateTables {
|
||||
if err := svc.DB.Exec(fmt.Sprintf("TRUNCATE TABLE %s RESTART IDENTITY CASCADE", table)).Error; err != nil {
|
||||
fmt.Printf("Truncate table %s failed: %v\n", table, err)
|
||||
}
|
||||
}
|
||||
|
||||
fmt.Println("Seeding data...")
|
||||
|
||||
// 1. Users
|
||||
|
||||
Reference in New Issue
Block a user