1 class CreateKeepDisks < ActiveRecord::Migration
3 create_table :keep_disks do |t|
4 t.string :uuid, :null => false
5 t.string :owner, :null => false
6 t.string :modified_by_client
7 t.string :modified_by_user
8 t.datetime :modified_at
9 t.string :ping_secret, :null => false
11 t.string :filesystem_uuid
12 t.integer :bytes_total
14 t.boolean :is_readable, :null => false, :default => true
15 t.boolean :is_writable, :null => false, :default => true
16 t.datetime :last_read_at
17 t.datetime :last_write_at
18 t.datetime :last_ping_at
22 add_index :keep_disks, :uuid, :unique => true
23 add_index :keep_disks, :filesystem_uuid
24 add_index :keep_disks, :node_uuid
25 add_index :keep_disks, :last_ping_at