Skip to content

Commit 8449d65

Browse files
authored
refactor: move deprecatedmigration pkg to under migration pkg (#3552)
* refactor: move deprecated migration pkg to under migration pkg * fix: lint
1 parent 8aabab8 commit 8449d65

18 files changed

Lines changed: 29 additions & 29 deletions

cmd/juno/dbcmd.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ import (
1111
"github.com/NethermindEth/juno/core/felt"
1212
"github.com/NethermindEth/juno/db"
1313
"github.com/NethermindEth/juno/db/pebblev2"
14-
"github.com/NethermindEth/juno/deprecatedmigration" //nolint:staticcheck,nolintlint // deprecated package will be removed later
1514
"github.com/NethermindEth/juno/migration"
15+
"github.com/NethermindEth/juno/migration/deprecated" //nolint:staticcheck,nolintlint // deprecated package will be removed later
1616
"github.com/NethermindEth/juno/utils"
1717
"github.com/olekukonko/tablewriter"
1818
"github.com/spf13/cobra"
@@ -109,7 +109,7 @@ func dbInfo(cmd *cobra.Command, args []string) error {
109109
schemaVersion = uint64(metadata.CurrentVersion)
110110
} else if errors.Is(err, db.ErrKeyNotFound) {
111111
// Fall back to deprecated migration system
112-
deprecatedMetadata, err := deprecatedmigration.SchemaMetadata(
112+
deprecatedMetadata, err := deprecated.SchemaMetadata(
113113
utils.NewNopZapLogger(),
114114
database,
115115
)
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package deprecatedmigration
1+
package deprecated
22

33
import (
44
"bytes"

deprecatedmigration/bucket_migrator_test.go renamed to migration/deprecated/bucket_migrator_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package deprecatedmigration_test
1+
package deprecated_test
22

33
import (
44
"bytes"
@@ -7,7 +7,7 @@ import (
77

88
"github.com/NethermindEth/juno/db"
99
"github.com/NethermindEth/juno/db/memory"
10-
"github.com/NethermindEth/juno/deprecatedmigration"
10+
"github.com/NethermindEth/juno/migration/deprecated"
1111
"github.com/NethermindEth/juno/utils"
1212
"github.com/stretchr/testify/require"
1313
)
@@ -16,7 +16,7 @@ func TestBucketMover(t *testing.T) {
1616
beforeCalled := false
1717
sourceBucket := db.Bucket(0)
1818
destBucket := db.Bucket(1)
19-
mover := deprecatedmigration.NewBucketMover(sourceBucket, destBucket).WithBefore(func() {
19+
mover := deprecated.NewBucketMover(sourceBucket, destBucket).WithBefore(func() {
2020
beforeCalled = true
2121
}).WithBatchSize(2).WithKeyFilter(func(b []byte) (bool, error) {
2222
return len(b) > 1, nil
@@ -39,7 +39,7 @@ func TestBucketMover(t *testing.T) {
3939
err error
4040
)
4141
_, err = mover.Migrate(t.Context(), testDB, &utils.Mainnet, nil)
42-
require.ErrorIs(t, err, deprecatedmigration.ErrCallWithNewTransaction)
42+
require.ErrorIs(t, err, deprecated.ErrCallWithNewTransaction)
4343

4444
intermediateState, err = mover.Migrate(t.Context(), testDB, &utils.Mainnet, nil)
4545
require.NoError(t, err)
File renamed without changes.

deprecatedmigration/casmhashmetadata/ingestors.go renamed to migration/deprecated/casmhashmetadata/ingestors.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/NethermindEth/juno/core"
77
"github.com/NethermindEth/juno/core/felt"
88
"github.com/NethermindEth/juno/db"
9-
"github.com/NethermindEth/juno/deprecatedmigration/progresslogger"
9+
"github.com/NethermindEth/juno/migration/deprecated/progresslogger"
1010
"github.com/NethermindEth/juno/migration/pipeline"
1111
"github.com/NethermindEth/juno/migration/semaphore"
1212
)

deprecatedmigration/casmhashmetadata/migrator.go renamed to migration/deprecated/casmhashmetadata/migrator.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
"github.com/NethermindEth/juno/db/typed"
1515
"github.com/NethermindEth/juno/db/typed/key"
1616
"github.com/NethermindEth/juno/db/typed/value"
17-
deprecatedprogresslogger "github.com/NethermindEth/juno/deprecatedmigration/progresslogger"
17+
deprecatedprogresslogger "github.com/NethermindEth/juno/migration/deprecated/progresslogger"
1818
"github.com/NethermindEth/juno/migration/pipeline"
1919
progresslogger "github.com/NethermindEth/juno/migration/progresslogger"
2020
"github.com/NethermindEth/juno/migration/semaphore"
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package deprecatedmigration
1+
package deprecated
22

33
import (
44
_ "github.com/NethermindEth/juno/encoder/registry"
File renamed without changes.

deprecatedmigration/l1handlermapping/ingestor.go renamed to migration/deprecated/l1handlermapping/ingestor.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55

66
"github.com/NethermindEth/juno/core"
77
"github.com/NethermindEth/juno/db"
8-
"github.com/NethermindEth/juno/deprecatedmigration/progresslogger"
98
"github.com/NethermindEth/juno/migration/blocktransactions/txlayout"
9+
"github.com/NethermindEth/juno/migration/deprecated/progresslogger"
1010
"github.com/NethermindEth/juno/migration/pipeline"
1111
"github.com/NethermindEth/juno/migration/semaphore"
1212
)
File renamed without changes.

0 commit comments

Comments
 (0)