Browse Source

update certificate model

master
Georg Hopp 10 years ago
parent
commit
b53333f8e2
  1. 5
      db/migrate/20160419084655_add_active_to_certificates.rb
  2. 5
      db/migrate/20160419085840_create_certificates.rb
  3. 10
      test/fixtures/certificates.yml

5
db/migrate/20160419084655_add_active_to_certificates.rb

@ -1,5 +0,0 @@
class AddActiveToCertificates < ActiveRecord::Migration
def change
add_column :certificates, :active, :boolean
end
end

5
db/migrate/20160419083600_create_certificates.rb → db/migrate/20160419085840_create_certificates.rb

@ -1,8 +1,9 @@
class CreateCertificates < ActiveRecord::Migration class CreateCertificates < ActiveRecord::Migration
def change def change
create_table :certificates do |t| create_table :certificates do |t|
t.string :key
t.string :cert
t.text :key
t.text :cert
t.boolean :active
t.timestamps null: false t.timestamps null: false
end end

10
test/fixtures/certificates.yml

@ -1,9 +1,11 @@
# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
one: one:
key: MyString
cert: MyString
key: MyText
cert: MyText
active: false
two: two:
key: MyString
cert: MyString
key: MyText
cert: MyText
active: false
Loading…
Cancel
Save