Class: CreateKeys

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

Instance Method Summary collapse

Instance Method Details

#downObject



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

def down
  drop_table :keys
end

#upObject



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

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