feat: add medias
This commit is contained in:
@@ -19,7 +19,7 @@ func FromContext(ctx context.Context, db *sql.DB) qrm.DB {
|
||||
|
||||
func TruncateAllTables(ctx context.Context, db *sql.DB, tableName ...string) error {
|
||||
for _, name := range tableName {
|
||||
sql := fmt.Sprintf("TRUNCATE TABLE %s CASCADE", name)
|
||||
sql := fmt.Sprintf("TRUNCATE TABLE %s RESTART IDENTITY", name)
|
||||
if _, err := db.ExecContext(ctx, sql); err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user