Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

truncate events #1957

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go/enclave/main/enclave-test.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"exe": "main",
"key": "testnet.pem",
"debug": true,
"heapSize": 4096,
"heapSize": 8192,
"executableHeap": true,
"productID": 1,
"securityVersion": 1,
Expand Down
2 changes: 1 addition & 1 deletion go/enclave/main/enclave.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"exe": "main",
"key": "testnet.pem",
"debug": true,
"heapSize": 4096,
"heapSize": 8192,
"executableHeap": true,
"productID": 1,
"securityVersion": 1,
Expand Down
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 @@ -19,7 +19,14 @@

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
Loading