mirror of
https://github.com/internetee/registry.git
synced 2025-07-25 12:08:27 +02:00
Add new resource for certs
This commit is contained in:
parent
143fb7eb1b
commit
5319db16b4
12 changed files with 310 additions and 33 deletions
15
db/migrate/20150223104842_create_certificates.rb
Normal file
15
db/migrate/20150223104842_create_certificates.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
class CreateCertificates < ActiveRecord::Migration
|
||||
def change
|
||||
create_table :certificates do |t|
|
||||
t.integer :api_user_id
|
||||
t.text :csr
|
||||
t.text :crt
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
ApiUser.all.each do |x|
|
||||
x.certificates << Certificate.new(crt: x.crt, csr: x.csr)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue