Browse Source

Add reference to used certificate to host.

master
Georg Hopp 10 years ago
parent
commit
862ee9fa2e
  1. 5
      db/migrate/20160506065802_add_certificate_to_hosts.rb
  2. 9
      db/schema.rb

5
db/migrate/20160506065802_add_certificate_to_hosts.rb

@ -0,0 +1,5 @@
class AddCertificateToHosts < ActiveRecord::Migration
def change
add_reference :hosts, :certificate, index: true, foreign_key: true
end
end

9
db/schema.rb

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160428191808) do
ActiveRecord::Schema.define(version: 20160506065802) do
create_table "certificates", force: :cascade do |t|
t.text "key"
@ -24,8 +24,11 @@ ActiveRecord::Schema.define(version: 20160428191808) do
create_table "hosts", force: :cascade do |t|
t.string "name"
t.string "uri"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.integer "certificate_id"
end
add_index "hosts", ["certificate_id"], name: "index_hosts_on_certificate_id"
end
Loading…
Cancel
Save