-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
33a6d4c
commit 23856a6
Showing
8 changed files
with
187 additions
and
293 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
-- +migrate Down | ||
DROP TABLE IF EXISTS claim; | ||
|
||
-- +migrate Up | ||
CREATE TABLE claim ( | ||
leaf_type INT NOT NULL, | ||
proof_local_exit_root VARCHAR NOT NULL, | ||
proof_rollup_exit_root VARCHAR NOT NULL, | ||
global_index VARCHAR NOT NULL, | ||
mainnet_exit_root VARCHAR NOT NULL, | ||
rollup_exit_root VARCHAR NOT NULL, | ||
origin_network INT NOT NULL, | ||
origin_token_address VARCHAR NOT NULL, | ||
destination_network INT NOT NULL, | ||
destination_address VARCHAR NOT NULL, | ||
amount VARCHAR NOT NULL, | ||
metadata VARCHAR NOT NULL, | ||
status VARCHAR NOT NULL, | ||
tx_id VARCHAR NOT NULL | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
package migrations | ||
|
||
import ( | ||
_ "embed" | ||
|
||
"github.com/0xPolygon/cdk/db" | ||
"github.com/0xPolygon/cdk/db/types" | ||
treeMigrations "github.com/0xPolygon/cdk/tree/migrations" | ||
) | ||
|
||
//go:embed claimsponsor0001.sql | ||
var mig001 string | ||
|
||
func RunMigrations(dbPath string) error { | ||
migrations := []types.Migration{ | ||
{ | ||
ID: "claimsponsor0001", | ||
SQL: mig001, | ||
}, | ||
} | ||
migrations = append(migrations, treeMigrations.Migrations...) | ||
return db.RunMigrations(dbPath, migrations) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.