Skip to content

Commit

Permalink
truncate events
Browse files Browse the repository at this point in the history
  • Loading branch information
tudor-malene committed Jun 11, 2024
1 parent 52f2d31 commit c63bc44
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions go/enclave/storage/init/migration/db_migration.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ import (
const currentMigrationVersionKey = "CURRENT_MIGRATION_VERSION"

func DBMigration(db *sql.DB, sqlFiles embed.FS, logger gethlog.Logger) error {

Check failure on line 22 in go/enclave/storage/init/migration/db_migration.go

View workflow job for this annotation

GitHub Actions / lint

unnecessary leading newline (whitespace)

// this is a temporary performance fix
_, err := db.Exec("truncate table events")
if err != nil {
return fmt.Errorf("failed to trunctate events. Cause: %w", err)
}

migrationFiles, err := readMigrationFiles(sqlFiles)
if err != nil {
return err
Expand Down

0 comments on commit c63bc44

Please sign in to comment.