57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
# File 'lib/mihari/database.rb', line 57
def change
create_table :autonomous_systems, if_not_exists: true do |t|
t.integer :asn, null: false
t.belongs_to :artifact, foreign_key: true
end
create_table :geolocations, if_not_exists: true do |t|
t.string :country, null: false
t.string :country_code, null: false
t.belongs_to :artifact, foreign_key: true
end
create_table :whois_records, if_not_exists: true do |t|
t.string :domain, null: false
t.date :created_on
t.date :updated_on
t.date :expires_on
t.json :registrar
t.json :contacts
t.belongs_to :artifact, foreign_key: true
end
create_table :dns_records, if_not_exists: true do |t|
t.string :resource, null: false
t.string :value, null: false
t.belongs_to :artifact, foreign_key: true
end
create_table :reverse_dns_names, if_not_exists: true do |t|
t.string :name, null: false
t.belongs_to :artifact, foreign_key: true
end
end
|