This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor contracts and classes insertion and update (#340)
* refactor contracts and classes insertion and update * format --------- Co-authored-by: Santiago Pittella <[email protected]>
- Loading branch information
1 parent
0a14084
commit 34668e4
Showing
5 changed files
with
73 additions
and
43 deletions.
There are no files selected for viewing
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
9 changes: 9 additions & 0 deletions
9
priv/repo/migrations/20231102142852_add_block_has_contracts_and_classes.exs
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,9 @@ | ||
defmodule StarknetExplorer.Repo.Migrations.AddBlockHasContractsAndClasses do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:blocks) do | ||
add :has_contracts_and_classes, :boolean, default: false | ||
end | ||
end | ||
end |
13 changes: 13 additions & 0 deletions
13
priv/repo/migrations/20231102175344_add_block_number_to_contracts_and_classes.exs
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,13 @@ | ||
defmodule StarknetExplorer.Repo.Migrations.AddBlockNumberToContractsAndClasses do | ||
use Ecto.Migration | ||
|
||
def change do | ||
alter table(:contracts) do | ||
add :block_number, :integer | ||
end | ||
|
||
alter table(:classes) do | ||
add :block_number, :integer | ||
end | ||
end | ||
end |