fix db query
[arvados.git] / db / schema.rb
1 # encoding: UTF-8
2 # This file is auto-generated from the current state of the database. Instead
3 # of editing this file, please use the migrations feature of Active Record to
4 # incrementally modify your database, and then regenerate this schema definition.
5 #
6 # Note that this schema.rb definition is the authoritative source for your
7 # database schema. If you need to create the application database on another
8 # system, you should be using db:schema:load, not running all the migrations
9 # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 # you'll amass, the slower it'll run and the greater likelihood for issues).
11 #
12 # It's strongly recommended to check this file into your version control system.
13
14 ActiveRecord::Schema.define(:version => 20130125220425) do
15
16   create_table "api_client_authorizations", :force => true do |t|
17     t.string   "api_token",               :null => false
18     t.integer  "api_client_id",           :null => false
19     t.integer  "user_id",                 :null => false
20     t.string   "created_by_ip_address"
21     t.string   "last_used_by_ip_address"
22     t.datetime "last_used_at"
23     t.datetime "expires_at"
24     t.datetime "created_at"
25     t.datetime "updated_at"
26   end
27
28   add_index "api_client_authorizations", ["api_client_id"], :name => "index_api_client_authorizations_on_api_client_id"
29   add_index "api_client_authorizations", ["api_token"], :name => "index_api_client_authorizations_on_api_token", :unique => true
30   add_index "api_client_authorizations", ["expires_at"], :name => "index_api_client_authorizations_on_expires_at"
31   add_index "api_client_authorizations", ["user_id"], :name => "index_api_client_authorizations_on_user_id"
32
33   create_table "api_clients", :force => true do |t|
34     t.string   "uuid"
35     t.string   "owner"
36     t.string   "modified_by_client"
37     t.string   "modified_by_user"
38     t.datetime "modified_at"
39     t.string   "name"
40     t.string   "url_prefix"
41     t.datetime "created_at"
42     t.datetime "updated_at"
43   end
44
45   add_index "api_clients", ["uuid"], :name => "index_api_clients_on_uuid", :unique => true
46
47   create_table "collections", :force => true do |t|
48     t.string   "locator"
49     t.string   "owner"
50     t.datetime "created_at"
51     t.string   "modified_by_client"
52     t.string   "modified_by_user"
53     t.datetime "modified_at"
54     t.string   "portable_data_hash"
55     t.string   "name"
56     t.integer  "redundancy"
57     t.string   "redundancy_confirmed_by_client"
58     t.datetime "redundancy_confirmed_at"
59     t.integer  "redundancy_confirmed_as"
60     t.datetime "updated_at"
61     t.string   "uuid"
62   end
63
64   add_index "collections", ["uuid"], :name => "index_collections_on_uuid", :unique => true
65
66   create_table "logs", :force => true do |t|
67     t.string   "uuid"
68     t.string   "owner"
69     t.string   "modified_by_client"
70     t.string   "modified_by_user"
71     t.string   "object_kind"
72     t.string   "object_uuid"
73     t.datetime "event_at"
74     t.string   "event_type"
75     t.text     "summary"
76     t.text     "info"
77     t.datetime "created_at"
78     t.datetime "updated_at"
79     t.datetime "modified_at"
80   end
81
82   add_index "logs", ["event_at"], :name => "index_logs_on_event_at"
83   add_index "logs", ["event_type"], :name => "index_logs_on_event_type"
84   add_index "logs", ["object_kind"], :name => "index_logs_on_object_kind"
85   add_index "logs", ["object_uuid"], :name => "index_logs_on_object_uuid"
86   add_index "logs", ["summary"], :name => "index_logs_on_summary"
87   add_index "logs", ["uuid"], :name => "index_logs_on_uuid", :unique => true
88
89   create_table "metadata", :force => true do |t|
90     t.string   "uuid"
91     t.string   "owner"
92     t.datetime "created_at"
93     t.string   "modified_by_client"
94     t.string   "modified_by_user"
95     t.datetime "modified_at"
96     t.string   "tail"
97     t.string   "tail_kind"
98     t.integer  "native_target_id"
99     t.string   "native_target_type"
100     t.string   "metadata_class"
101     t.string   "name"
102     t.string   "head"
103     t.text     "info"
104     t.datetime "updated_at"
105     t.string   "head_kind"
106   end
107
108   add_index "metadata", ["head"], :name => "index_metadata_on_head"
109   add_index "metadata", ["head_kind"], :name => "index_metadata_on_head_kind"
110   add_index "metadata", ["tail"], :name => "index_metadata_on_tail"
111   add_index "metadata", ["tail_kind"], :name => "index_metadata_on_tail_kind"
112   add_index "metadata", ["uuid"], :name => "index_metadata_on_uuid", :unique => true
113
114   create_table "nodes", :force => true do |t|
115     t.string   "uuid"
116     t.string   "owner"
117     t.datetime "created_at"
118     t.string   "modified_by_client"
119     t.string   "modified_by_user"
120     t.datetime "modified_at"
121     t.integer  "slot_number"
122     t.string   "hostname"
123     t.string   "domain"
124     t.string   "ip_address"
125     t.datetime "first_ping_at"
126     t.datetime "last_ping_at"
127     t.text     "info"
128     t.datetime "updated_at"
129   end
130
131   add_index "nodes", ["hostname"], :name => "index_nodes_on_hostname", :unique => true
132   add_index "nodes", ["slot_number"], :name => "index_nodes_on_slot_number", :unique => true
133   add_index "nodes", ["uuid"], :name => "index_nodes_on_uuid", :unique => true
134
135   create_table "pipeline_invocations", :force => true do |t|
136     t.string   "uuid"
137     t.string   "owner"
138     t.datetime "created_at"
139     t.string   "modified_by_client"
140     t.string   "modified_by_user"
141     t.datetime "modified_at"
142     t.string   "pipeline_uuid"
143     t.string   "name"
144     t.text     "components"
145     t.boolean  "success"
146     t.boolean  "active",             :default => false
147     t.datetime "updated_at"
148   end
149
150   add_index "pipeline_invocations", ["uuid"], :name => "index_pipeline_invocations_on_uuid", :unique => true
151
152   create_table "pipelines", :force => true do |t|
153     t.string   "uuid"
154     t.string   "owner"
155     t.datetime "created_at"
156     t.string   "modified_by_client"
157     t.string   "modified_by_user"
158     t.datetime "modified_at"
159     t.string   "name"
160     t.text     "components"
161     t.datetime "updated_at"
162   end
163
164   add_index "pipelines", ["uuid"], :name => "index_pipelines_on_uuid", :unique => true
165
166   create_table "projects", :force => true do |t|
167     t.string   "uuid"
168     t.string   "owner"
169     t.datetime "created_at"
170     t.string   "modified_by_client"
171     t.string   "modified_by_user"
172     t.datetime "modified_at"
173     t.string   "name"
174     t.text     "description"
175     t.datetime "updated_at"
176   end
177
178   add_index "projects", ["uuid"], :name => "index_projects_on_uuid", :unique => true
179
180   create_table "specimens", :force => true do |t|
181     t.string   "uuid"
182     t.string   "owner"
183     t.datetime "created_at"
184     t.string   "modified_by_client"
185     t.string   "modified_by_user"
186     t.datetime "modified_at"
187     t.string   "material"
188     t.datetime "updated_at"
189   end
190
191   add_index "specimens", ["uuid"], :name => "index_specimens_on_uuid", :unique => true
192
193   create_table "users", :force => true do |t|
194     t.string   "uuid"
195     t.string   "owner"
196     t.datetime "created_at"
197     t.string   "modified_by_client"
198     t.string   "modified_by_user"
199     t.datetime "modified_at"
200     t.string   "email"
201     t.string   "first_name"
202     t.string   "last_name"
203     t.string   "identity_url"
204     t.boolean  "is_admin"
205     t.text     "prefs"
206     t.datetime "updated_at"
207   end
208
209   add_index "users", ["uuid"], :name => "index_users_on_uuid", :unique => true
210
211 end