Class: CreateKeys

Inherits:
Debci::DB::LEGACY_MIGRATION
  • Object
show all
Defined in:
lib/debci/db/migrations/201803101326_create_keys.rb

Instance Method Summary collapse

Instance Method Details

#downObject



10
11
12
# File 'lib/debci/db/migrations/201803101326_create_keys.rb', line 10

def down
  drop_table :keys
end

#upObject



2
3
4
5
6
7
8
# File 'lib/debci/db/migrations/201803101326_create_keys.rb', line 2

def up
  create_table(:keys) do |t|
    t.timestamps(null: false)
    t.string :user, limit: 256, null: false
    t.string :encrypted_key, limit: 40, null: false, index: true
  end
end