-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #134 from getamis/write-new-db
Write new db
- Loading branch information
Showing
8 changed files
with
31 additions
and
13 deletions.
There are no files selected for viewing
5 changes: 0 additions & 5 deletions
5
migration/db/migrate/20190213032740_add_reorg_unique_index_from_and_to_hash.rb
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
migration/db/migrate/20190220031810_add_new_reorg_table.rb
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,14 @@ | ||
class AddNewReorgTable < ActiveRecord::Migration[5.2] | ||
def change | ||
# Create new table for reorg events | ||
create_table :reorgs2 do |t| | ||
t.integer :from, :limit => 8, :null => false | ||
t.binary :from_hash, :limit => 32, :null => false | ||
t.integer :to, :limit => 8, :null => false | ||
t.binary :to_hash, :limit => 32, :null => false | ||
t.datetime :created_at, :null => false | ||
end | ||
add_index :reorgs2, [:from, :to] | ||
add_index :reorgs2, [:from_hash, :to_hash], :unique => true | ||
end | ||
end |
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
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