2013-02-28 17:02:14 +00:00
|
|
|
class CreateSshKeys < ActiveRecord::Migration
|
|
|
|
def change
|
|
|
|
create_table :ssh_keys do |t|
|
2013-03-01 17:35:33 +00:00
|
|
|
t.string :name
|
2014-01-21 04:51:49 +00:00
|
|
|
t.text :key, null: false
|
|
|
|
t.string :fingerprint, null: false
|
|
|
|
t.integer :user_id, null: false
|
2013-02-28 17:02:14 +00:00
|
|
|
|
|
|
|
t.timestamps
|
|
|
|
end
|
|
|
|
|
2014-01-21 04:51:49 +00:00
|
|
|
add_index :ssh_keys, :fingerprint, unique: true
|
2013-02-28 17:02:14 +00:00
|
|
|
add_index :ssh_keys, :user_id
|
|
|
|
end
|
|
|
|
end
|