Commit b53333f8e23a50dd2848116fd1016114825a14f0

Authored by Georg Hopp
1 parent 49a94c38

update certificate model

1 -class AddActiveToCertificates < ActiveRecord::Migration  
2 - def change  
3 - add_column :certificates, :active, :boolean  
4 - end  
5 -end  
1 class CreateCertificates < ActiveRecord::Migration 1 class CreateCertificates < ActiveRecord::Migration
2 def change 2 def change
3 create_table :certificates do |t| 3 create_table :certificates do |t|
4 - t.string :key  
5 - t.string :cert 4 + t.text :key
  5 + t.text :cert
  6 + t.boolean :active
6 7
7 t.timestamps null: false 8 t.timestamps null: false
8 end 9 end
1 # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html 1 # Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html
2 2
3 one: 3 one:
4 - key: MyString  
5 - cert: MyString 4 + key: MyText
  5 + cert: MyText
  6 + active: false
6 7
7 two: 8 two:
8 - key: MyString  
9 - cert: MyString 9 + key: MyText
  10 + cert: MyText
  11 + active: false
Please register or login to post a comment