mirror of
https://github.com/internetee/registry.git
synced 2025-08-01 15:34:41 +02:00
15 lines
306 B
Ruby
15 lines
306 B
Ruby
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
|