Merge branch '8784-dir-listings'
[arvados.git] / services / api / db / migrate / 20130105203021_create_metadata.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class CreateMetadata < ActiveRecord::Migration
6   def change
7     create_table :metadata do |t|
8       t.string :uuid
9       t.string :created_by_client
10       t.string :created_by_user
11       t.datetime :created_at
12       t.string :modified_by_client
13       t.string :modified_by_user
14       t.datetime :modified_at
15       t.string :target_uuid
16       t.string :target_kind
17       t.references :native_target, :polymorphic => true
18       t.string :metadatum_class
19       t.string :key
20       t.string :value
21       t.text :info # "unlimited length" in postgresql
22
23       t.timestamps
24     end
25   end
26 end