1 # Copyright (C) The Arvados Authors. All rights reserved.
3 # SPDX-License-Identifier: AGPL-3.0
5 class CreateKeepDisks < ActiveRecord::Migration[4.2]
7 create_table :keep_disks do |t|
8 t.string :uuid, :null => false
9 t.string :owner, :null => false
10 t.string :modified_by_client
11 t.string :modified_by_user
12 t.datetime :modified_at
13 t.string :ping_secret, :null => false
15 t.string :filesystem_uuid
16 t.integer :bytes_total
18 t.boolean :is_readable, :null => false, :default => true
19 t.boolean :is_writable, :null => false, :default => true
20 t.datetime :last_read_at
21 t.datetime :last_write_at
22 t.datetime :last_ping_at
26 add_index :keep_disks, :uuid, :unique => true
27 add_index :keep_disks, :filesystem_uuid
28 add_index :keep_disks, :node_uuid
29 add_index :keep_disks, :last_ping_at