add some migrations

This commit is contained in:
nigel007 2019-08-25 09:52:19 +08:00
parent 67529e303d
commit 4bec29371e
5 changed files with 45 additions and 0 deletions

View File

@ -0,0 +1,9 @@
class RemoveGenesisContentFromBlockchains < ActiveRecord::Migration
def up
remove_column :blockchains, :genesis_content
end
def down
add_column :blockchains, :genesis_content, :text
end
end

View File

@ -0,0 +1,9 @@
class RemoveNetworkIdFromBlockchains < ActiveRecord::Migration
def up
remove_column :blockchains, :network_id
end
def down
add_column :blockchains, :network_id, :integer
end
end

View File

@ -0,0 +1,9 @@
class RemoveConnectIpFromBlockchains < ActiveRecord::Migration
def up
remove_column :blockchains, :connect_ip
end
def down
add_column :blockchains, :connect_ip, :integer
end
end

View File

@ -0,0 +1,9 @@
class RemovePortFromBlockchains < ActiveRecord::Migration
def up
remove_column :blockchains, :port
end
def down
add_column :blockchains, :port, :integer
end
end

View File

@ -0,0 +1,9 @@
class RemoveEnodeFromBlockchains < ActiveRecord::Migration
def up
remove_column :blockchains, :enode
end
def down
add_column :blockchains, :enode, :string
end
end