diff --git a/go/enclave/storage/init/edgelessdb/001_init.sql b/go/enclave/storage/init/edgelessdb/001_init.sql index fb81076e49..5787533d71 100644 --- a/go/enclave/storage/init/edgelessdb/001_init.sql +++ b/go/enclave/storage/init/edgelessdb/001_init.sql @@ -54,15 +54,14 @@ GRANT ALL ON obsdb.l1_msg TO obscuro; create table if not exists obsdb.rollup ( - id INTEGER AUTO_INCREMENT, - start_seq int NOT NULL, - end_seq int NOT NULL, - header blob NOT NULL, - block binary(32) NOT NULL, - INDEX (block), - primary key (id) -); -GRANT ALL ON obsdb.rollup TO obscuro; + hash binary(32), + start_seq int NOT NULL, + end_seq int NOT NULL, + header blob NOT NULL, + compression_block binary(32) NOT NULL, + INDEX (compression_block), + primary key (hash) + ); create table if not exists obsdb.batch_body ( diff --git a/go/enclave/storage/init/edgelessdb/002_init.sql b/go/enclave/storage/init/edgelessdb/002_init.sql deleted file mode 100644 index 4b532ba776..0000000000 --- a/go/enclave/storage/init/edgelessdb/002_init.sql +++ /dev/null @@ -1,13 +0,0 @@ -drop table obsdb.rollup; - -create table if not exists obsdb.rollup -( - hash binary(32), - start_seq int NOT NULL, - end_seq int NOT NULL, - header blob NOT NULL, - compression_block binary(32) NOT NULL, - INDEX (compression_block), - primary key (hash) -); -GRANT ALL ON obsdb.rollup TO obscuro; diff --git a/go/enclave/storage/init/migration/db_migration.go b/go/enclave/storage/init/migration/db_migration.go index 4b549bb0e4..b243bc0125 100644 --- a/go/enclave/storage/init/migration/db_migration.go +++ b/go/enclave/storage/init/migration/db_migration.go @@ -3,7 +3,6 @@ package migration import ( "database/sql" "embed" - "encoding/base64" "errors" "fmt" "io/fs" @@ -49,8 +48,6 @@ func DBMigration(db *sql.DB, sqlFiles embed.FS, logger gethlog.Logger) error { } err = executeMigration(db, string(content), i) if err != nil { - fmt.Println(base64.StdEncoding.EncodeToString([]byte(err.Error()))) - logger.Error(fmt.Sprintf("%s", base64.StdEncoding.EncodeToString([]byte(err.Error())))) return fmt.Errorf("unable to execute migration for %s - %w", migrationFiles[i].Name(), err) } logger.Info("Successfully executed", "file", migrationFiles[i].Name(), "index", i)