erp_tech_svcs 3.0.11 → 3.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. data/app/models/group.rb +23 -1
  2. data/app/models/user.rb +39 -9
  3. data/lib/erp_tech_svcs/extensions/active_record/has_capability_accessors.rb +10 -4
  4. data/lib/erp_tech_svcs/extensions/active_record/protected_with_capabilities.rb +53 -28
  5. data/lib/erp_tech_svcs/utils/compass_access_negotiator.rb +5 -3
  6. data/lib/erp_tech_svcs/version.rb +1 -1
  7. data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +15 -0
  8. data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
  9. data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
  10. data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +16 -0
  11. data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
  12. data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +22 -0
  13. data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +20 -0
  14. data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +24 -0
  15. data/spec/dummy/db/migrate/20130105133955_base_erp_services.erp_base_erp_svcs.rb +461 -0
  16. data/spec/dummy/db/migrate/20130105133956_base_tech_services.erp_tech_svcs.rb +271 -0
  17. data/spec/dummy/db/migrate/20130105133957_create_has_attribute_tables.erp_tech_svcs.rb +39 -0
  18. data/spec/dummy/db/migrate/20130105133958_create_groups.erp_tech_svcs.rb +19 -0
  19. data/spec/dummy/db/migrate/20130105133959_upgrade_security.erp_tech_svcs.rb +54 -0
  20. data/spec/dummy/db/migrate/20130105133960_upgrade_security2.erp_tech_svcs.rb +270 -0
  21. data/spec/dummy/db/schema.rb +613 -0
  22. data/spec/dummy/db/spec.sqlite3 +0 -0
  23. data/spec/dummy/log/adam.log +1 -0
  24. data/spec/dummy/log/spec.log +128273 -0
  25. metadata +93 -22
@@ -0,0 +1,613 @@
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 => 20130105133960) do
15
+
16
+ create_table "attribute_types", :force => true do |t|
17
+ t.string "internal_identifier"
18
+ t.string "description"
19
+ t.string "data_type"
20
+ t.datetime "created_at", :null => false
21
+ t.datetime "updated_at", :null => false
22
+ end
23
+
24
+ add_index "attribute_types", ["internal_identifier"], :name => ":attribute_types_iid_idx"
25
+
26
+ create_table "attribute_values", :force => true do |t|
27
+ t.integer "attributed_record_id"
28
+ t.string "attributed_record_type"
29
+ t.integer "attribute_type_id"
30
+ t.string "value"
31
+ t.datetime "created_at", :null => false
32
+ t.datetime "updated_at", :null => false
33
+ end
34
+
35
+ add_index "attribute_values", ["attribute_type_id"], :name => "attribute_values_attributed_type_idx"
36
+ add_index "attribute_values", ["attributed_record_id", "attributed_record_type"], :name => "attribute_values_attributed_record_idx"
37
+ add_index "attribute_values", ["value"], :name => "attribute_values_value_idx"
38
+
39
+ create_table "audit_log_item_types", :force => true do |t|
40
+ t.string "internal_identifier"
41
+ t.string "external_identifier"
42
+ t.string "external_id_source"
43
+ t.string "description"
44
+ t.string "comments"
45
+ t.integer "parent_id"
46
+ t.integer "lft"
47
+ t.integer "rgt"
48
+ t.datetime "created_at", :null => false
49
+ t.datetime "updated_at", :null => false
50
+ end
51
+
52
+ create_table "audit_log_items", :force => true do |t|
53
+ t.integer "audit_log_id"
54
+ t.integer "audit_log_item_type_id"
55
+ t.string "audit_log_item_value"
56
+ t.string "description"
57
+ t.datetime "created_at", :null => false
58
+ t.datetime "updated_at", :null => false
59
+ end
60
+
61
+ create_table "audit_log_types", :force => true do |t|
62
+ t.string "description"
63
+ t.string "error_code"
64
+ t.string "comments"
65
+ t.string "internal_identifier"
66
+ t.string "external_identifier"
67
+ t.string "external_id_source"
68
+ t.integer "parent_id"
69
+ t.integer "lft"
70
+ t.integer "rgt"
71
+ t.datetime "created_at", :null => false
72
+ t.datetime "updated_at", :null => false
73
+ end
74
+
75
+ create_table "audit_logs", :force => true do |t|
76
+ t.string "application"
77
+ t.string "description"
78
+ t.integer "party_id"
79
+ t.text "additional_info"
80
+ t.integer "audit_log_type_id"
81
+ t.integer "event_record_id"
82
+ t.string "event_record_type"
83
+ t.datetime "created_at", :null => false
84
+ t.datetime "updated_at", :null => false
85
+ end
86
+
87
+ add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
88
+ add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
89
+
90
+ create_table "capabilities", :force => true do |t|
91
+ t.string "description"
92
+ t.integer "capability_type_id"
93
+ t.string "capability_resource_type"
94
+ t.integer "capability_resource_id"
95
+ t.integer "scope_type_id"
96
+ t.text "scope_query"
97
+ t.datetime "created_at", :null => false
98
+ t.datetime "updated_at", :null => false
99
+ end
100
+
101
+ add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
102
+ add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
103
+ add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
104
+
105
+ create_table "capability_accessors", :force => true do |t|
106
+ t.string "capability_accessor_record_type"
107
+ t.integer "capability_accessor_record_id"
108
+ t.integer "capability_id"
109
+ t.datetime "created_at", :null => false
110
+ t.datetime "updated_at", :null => false
111
+ end
112
+
113
+ add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
114
+ add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
115
+
116
+ create_table "capability_types", :force => true do |t|
117
+ t.string "internal_identifier"
118
+ t.string "description"
119
+ t.datetime "created_at", :null => false
120
+ t.datetime "updated_at", :null => false
121
+ end
122
+
123
+ create_table "capable_models", :force => true do |t|
124
+ t.integer "capable_model_record_id"
125
+ t.string "capable_model_record_type"
126
+ t.datetime "created_at", :null => false
127
+ t.datetime "updated_at", :null => false
128
+ end
129
+
130
+ add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
131
+
132
+ create_table "categories", :force => true do |t|
133
+ t.string "description"
134
+ t.string "external_identifier"
135
+ t.datetime "from_date"
136
+ t.datetime "to_date"
137
+ t.string "internal_identifier"
138
+ t.integer "category_record_id"
139
+ t.string "category_record_type"
140
+ t.integer "parent_id"
141
+ t.integer "lft"
142
+ t.integer "rgt"
143
+ t.datetime "created_at", :null => false
144
+ t.datetime "updated_at", :null => false
145
+ end
146
+
147
+ add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
148
+
149
+ create_table "category_classifications", :force => true do |t|
150
+ t.integer "category_id"
151
+ t.string "classification_type"
152
+ t.integer "classification_id"
153
+ t.datetime "from_date"
154
+ t.datetime "to_date"
155
+ t.datetime "created_at", :null => false
156
+ t.datetime "updated_at", :null => false
157
+ end
158
+
159
+ add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
160
+
161
+ create_table "compass_ae_instances", :force => true do |t|
162
+ t.decimal "version", :precision => 8, :scale => 3
163
+ t.datetime "created_at", :null => false
164
+ t.datetime "updated_at", :null => false
165
+ end
166
+
167
+ create_table "contact_purposes", :force => true do |t|
168
+ t.integer "parent_id"
169
+ t.integer "lft"
170
+ t.integer "rgt"
171
+ t.string "description"
172
+ t.string "comments"
173
+ t.string "internal_identifier"
174
+ t.string "external_identifier"
175
+ t.string "external_id_source"
176
+ t.datetime "created_at", :null => false
177
+ t.datetime "updated_at", :null => false
178
+ end
179
+
180
+ add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
181
+
182
+ create_table "contact_purposes_contacts", :id => false, :force => true do |t|
183
+ t.integer "contact_id"
184
+ t.integer "contact_purpose_id"
185
+ end
186
+
187
+ add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
188
+
189
+ create_table "contact_types", :force => true do |t|
190
+ t.integer "parent_id"
191
+ t.integer "lft"
192
+ t.integer "rgt"
193
+ t.string "description"
194
+ t.string "comments"
195
+ t.string "internal_identifier"
196
+ t.string "external_identifier"
197
+ t.string "external_id_source"
198
+ t.datetime "created_at", :null => false
199
+ t.datetime "updated_at", :null => false
200
+ end
201
+
202
+ add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
203
+
204
+ create_table "contacts", :force => true do |t|
205
+ t.integer "party_id"
206
+ t.integer "contact_mechanism_id"
207
+ t.string "contact_mechanism_type"
208
+ t.string "external_identifier"
209
+ t.string "external_id_source"
210
+ t.datetime "created_at", :null => false
211
+ t.datetime "updated_at", :null => false
212
+ end
213
+
214
+ add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
215
+ add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
216
+
217
+ create_table "currencies", :force => true do |t|
218
+ t.string "name"
219
+ t.string "definition"
220
+ t.string "internal_identifier"
221
+ t.string "numeric_code"
222
+ t.string "major_unit_symbol"
223
+ t.string "minor_unit_symbol"
224
+ t.string "ratio_of_minor_unit_to_major_unit"
225
+ t.string "postfix_label"
226
+ t.datetime "introduction_date"
227
+ t.datetime "expiration_date"
228
+ t.datetime "created_at", :null => false
229
+ t.datetime "updated_at", :null => false
230
+ end
231
+
232
+ add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
233
+
234
+ create_table "delayed_jobs", :force => true do |t|
235
+ t.integer "priority", :default => 0
236
+ t.integer "attempts", :default => 0
237
+ t.text "handler"
238
+ t.text "last_error"
239
+ t.datetime "run_at"
240
+ t.datetime "locked_at"
241
+ t.datetime "failed_at"
242
+ t.string "locked_by"
243
+ t.string "queue"
244
+ t.datetime "created_at", :null => false
245
+ t.datetime "updated_at", :null => false
246
+ end
247
+
248
+ add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
249
+
250
+ create_table "descriptive_assets", :force => true do |t|
251
+ t.integer "view_type_id"
252
+ t.string "internal_identifier"
253
+ t.text "description"
254
+ t.string "external_identifier"
255
+ t.string "external_id_source"
256
+ t.integer "described_record_id"
257
+ t.string "described_record_type"
258
+ t.datetime "created_at", :null => false
259
+ t.datetime "updated_at", :null => false
260
+ end
261
+
262
+ add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
263
+ add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
264
+
265
+ create_table "email_addresses", :force => true do |t|
266
+ t.string "email_address"
267
+ t.string "description"
268
+ t.datetime "created_at", :null => false
269
+ t.datetime "updated_at", :null => false
270
+ end
271
+
272
+ create_table "file_assets", :force => true do |t|
273
+ t.integer "file_asset_holder_id"
274
+ t.string "file_asset_holder_type"
275
+ t.string "type"
276
+ t.string "name"
277
+ t.string "directory"
278
+ t.string "data_file_name"
279
+ t.string "data_content_type"
280
+ t.integer "data_file_size"
281
+ t.datetime "data_updated_at"
282
+ t.string "width"
283
+ t.string "height"
284
+ t.datetime "created_at", :null => false
285
+ t.datetime "updated_at", :null => false
286
+ end
287
+
288
+ add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
289
+ add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
290
+ add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
291
+ add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
292
+
293
+ create_table "geo_countries", :force => true do |t|
294
+ t.string "name"
295
+ t.string "iso_code_2"
296
+ t.string "iso_code_3"
297
+ t.boolean "display", :default => true
298
+ t.integer "external_id"
299
+ t.datetime "created_at"
300
+ end
301
+
302
+ add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
303
+ add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
304
+
305
+ create_table "geo_zones", :force => true do |t|
306
+ t.integer "geo_country_id"
307
+ t.string "zone_code", :default => "2"
308
+ t.string "zone_name"
309
+ t.datetime "created_at"
310
+ end
311
+
312
+ add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
313
+ add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
314
+ add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
315
+
316
+ create_table "groups", :force => true do |t|
317
+ t.string "description"
318
+ t.datetime "created_at", :null => false
319
+ t.datetime "updated_at", :null => false
320
+ end
321
+
322
+ create_table "individuals", :force => true do |t|
323
+ t.integer "party_id"
324
+ t.string "current_last_name"
325
+ t.string "current_first_name"
326
+ t.string "current_middle_name"
327
+ t.string "current_personal_title"
328
+ t.string "current_suffix"
329
+ t.string "current_nickname"
330
+ t.string "gender", :limit => 1
331
+ t.date "birth_date"
332
+ t.decimal "height", :precision => 5, :scale => 2
333
+ t.integer "weight"
334
+ t.string "mothers_maiden_name"
335
+ t.string "marital_status", :limit => 1
336
+ t.string "social_security_number"
337
+ t.integer "current_passport_number"
338
+ t.date "current_passport_expire_date"
339
+ t.integer "total_years_work_experience"
340
+ t.string "comments"
341
+ t.string "encrypted_ssn"
342
+ t.string "temp_ssn"
343
+ t.string "salt"
344
+ t.string "ssn_last_four"
345
+ t.datetime "created_at", :null => false
346
+ t.datetime "updated_at", :null => false
347
+ end
348
+
349
+ add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
350
+
351
+ create_table "money", :force => true do |t|
352
+ t.string "description"
353
+ t.decimal "amount", :precision => 8, :scale => 2
354
+ t.integer "currency_id"
355
+ t.datetime "created_at", :null => false
356
+ t.datetime "updated_at", :null => false
357
+ end
358
+
359
+ add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
360
+
361
+ create_table "note_types", :force => true do |t|
362
+ t.integer "parent_id"
363
+ t.integer "lft"
364
+ t.integer "rgt"
365
+ t.string "description"
366
+ t.string "internal_identifier"
367
+ t.string "external_identifier"
368
+ t.integer "note_type_record_id"
369
+ t.string "note_type_record_type"
370
+ t.datetime "created_at", :null => false
371
+ t.datetime "updated_at", :null => false
372
+ end
373
+
374
+ add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
375
+
376
+ create_table "notes", :force => true do |t|
377
+ t.integer "created_by_id"
378
+ t.text "content"
379
+ t.integer "noted_record_id"
380
+ t.string "noted_record_type"
381
+ t.integer "note_type_id"
382
+ t.datetime "created_at", :null => false
383
+ t.datetime "updated_at", :null => false
384
+ end
385
+
386
+ add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
387
+ add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
388
+ add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
389
+
390
+ create_table "organizations", :force => true do |t|
391
+ t.string "description"
392
+ t.string "tax_id_number"
393
+ t.datetime "created_at", :null => false
394
+ t.datetime "updated_at", :null => false
395
+ end
396
+
397
+ create_table "parties", :force => true do |t|
398
+ t.string "description"
399
+ t.integer "business_party_id"
400
+ t.string "business_party_type"
401
+ t.integer "list_view_image_id"
402
+ t.string "enterprise_identifier"
403
+ t.datetime "created_at", :null => false
404
+ t.datetime "updated_at", :null => false
405
+ end
406
+
407
+ add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
408
+
409
+ create_table "parties_security_roles", :id => false, :force => true do |t|
410
+ t.integer "party_id"
411
+ t.integer "security_role_id"
412
+ end
413
+
414
+ add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
415
+ add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
416
+
417
+ create_table "party_relationships", :force => true do |t|
418
+ t.string "description"
419
+ t.integer "party_id_from"
420
+ t.integer "party_id_to"
421
+ t.integer "role_type_id_from"
422
+ t.integer "role_type_id_to"
423
+ t.integer "status_type_id"
424
+ t.integer "priority_type_id"
425
+ t.integer "relationship_type_id"
426
+ t.date "from_date"
427
+ t.date "thru_date"
428
+ t.string "external_identifier"
429
+ t.string "external_id_source"
430
+ t.datetime "created_at", :null => false
431
+ t.datetime "updated_at", :null => false
432
+ end
433
+
434
+ add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
435
+ add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
436
+ add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
437
+
438
+ create_table "party_roles", :force => true do |t|
439
+ t.string "type"
440
+ t.integer "party_id"
441
+ t.integer "role_type_id"
442
+ t.datetime "created_at", :null => false
443
+ t.datetime "updated_at", :null => false
444
+ end
445
+
446
+ add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
447
+ add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
448
+
449
+ create_table "party_search_facts", :force => true do |t|
450
+ t.integer "party_id"
451
+ t.string "eid"
452
+ t.string "type"
453
+ t.text "roles"
454
+ t.string "party_description"
455
+ t.string "party_business_party_type"
456
+ t.string "user_login"
457
+ t.string "individual_current_last_name"
458
+ t.string "individual_current_first_name"
459
+ t.string "individual_current_middle_name"
460
+ t.string "individual_birth_date"
461
+ t.string "individual_ssn"
462
+ t.string "party_phone_number"
463
+ t.string "party_email_address"
464
+ t.string "party_address_1"
465
+ t.string "party_address_2"
466
+ t.string "party_primary_address_city"
467
+ t.string "party_primary_address_state"
468
+ t.string "party_primary_address_zip"
469
+ t.string "party_primary_address_country"
470
+ t.boolean "user_enabled"
471
+ t.string "user_type"
472
+ t.boolean "reindex"
473
+ t.datetime "created_at", :null => false
474
+ t.datetime "updated_at", :null => false
475
+ end
476
+
477
+ create_table "phone_numbers", :force => true do |t|
478
+ t.string "phone_number"
479
+ t.string "description"
480
+ t.datetime "created_at", :null => false
481
+ t.datetime "updated_at", :null => false
482
+ end
483
+
484
+ create_table "postal_addresses", :force => true do |t|
485
+ t.string "address_line_1"
486
+ t.string "address_line_2"
487
+ t.string "city"
488
+ t.string "state"
489
+ t.string "zip"
490
+ t.string "country"
491
+ t.string "description"
492
+ t.integer "geo_country_id"
493
+ t.integer "geo_zone_id"
494
+ t.datetime "created_at", :null => false
495
+ t.datetime "updated_at", :null => false
496
+ end
497
+
498
+ add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
499
+ add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
500
+
501
+ create_table "relationship_types", :force => true do |t|
502
+ t.integer "parent_id"
503
+ t.integer "lft"
504
+ t.integer "rgt"
505
+ t.integer "valid_from_role_type_id"
506
+ t.integer "valid_to_role_type_id"
507
+ t.string "name"
508
+ t.string "description"
509
+ t.string "internal_identifier"
510
+ t.string "external_identifier"
511
+ t.string "external_id_source"
512
+ t.datetime "created_at", :null => false
513
+ t.datetime "updated_at", :null => false
514
+ end
515
+
516
+ add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
517
+ add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
518
+
519
+ create_table "role_types", :force => true do |t|
520
+ t.integer "parent_id"
521
+ t.integer "lft"
522
+ t.integer "rgt"
523
+ t.string "description"
524
+ t.string "comments"
525
+ t.string "internal_identifier"
526
+ t.string "external_identifier"
527
+ t.string "external_id_source"
528
+ t.datetime "created_at", :null => false
529
+ t.datetime "updated_at", :null => false
530
+ end
531
+
532
+ create_table "scope_types", :force => true do |t|
533
+ t.string "description"
534
+ t.string "internal_identifier"
535
+ t.datetime "created_at", :null => false
536
+ t.datetime "updated_at", :null => false
537
+ end
538
+
539
+ add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
540
+
541
+ create_table "security_roles", :force => true do |t|
542
+ t.string "description"
543
+ t.string "internal_identifier"
544
+ t.string "external_identifier"
545
+ t.string "external_id_source"
546
+ t.datetime "created_at", :null => false
547
+ t.datetime "updated_at", :null => false
548
+ end
549
+
550
+ create_table "sessions", :force => true do |t|
551
+ t.string "session_id", :null => false
552
+ t.text "data"
553
+ t.datetime "created_at", :null => false
554
+ t.datetime "updated_at", :null => false
555
+ end
556
+
557
+ add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
558
+ add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
559
+
560
+ create_table "users", :force => true do |t|
561
+ t.string "username"
562
+ t.string "email"
563
+ t.integer "party_id"
564
+ t.string "type"
565
+ t.string "salt"
566
+ t.string "crypted_password"
567
+ t.datetime "last_login_at"
568
+ t.datetime "last_logout_at"
569
+ t.datetime "last_activity_at"
570
+ t.integer "failed_logins_count", :default => 0
571
+ t.datetime "lock_expires_at"
572
+ t.string "remember_me_token"
573
+ t.datetime "remember_me_token_expires_at"
574
+ t.string "reset_password_token"
575
+ t.datetime "reset_password_token_expires_at"
576
+ t.datetime "reset_password_email_sent_at"
577
+ t.string "activation_state"
578
+ t.string "activation_token"
579
+ t.datetime "activation_token_expires_at"
580
+ t.string "security_question_1"
581
+ t.string "security_answer_1"
582
+ t.string "security_question_2"
583
+ t.string "security_answer_2"
584
+ t.datetime "created_at", :null => false
585
+ t.datetime "updated_at", :null => false
586
+ end
587
+
588
+ add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
589
+ add_index "users", ["email"], :name => "index_users_on_email", :unique => true
590
+ add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
591
+ add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
592
+ add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
593
+ add_index "users", ["username"], :name => "index_users_on_username", :unique => true
594
+
595
+ create_table "valid_note_types", :force => true do |t|
596
+ t.integer "valid_note_type_record_id"
597
+ t.string "valid_note_type_record_type"
598
+ t.integer "note_type_id"
599
+ t.datetime "created_at", :null => false
600
+ t.datetime "updated_at", :null => false
601
+ end
602
+
603
+ add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
604
+ add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
605
+
606
+ create_table "view_types", :force => true do |t|
607
+ t.string "internal_identifier"
608
+ t.string "description"
609
+ t.datetime "created_at", :null => false
610
+ t.datetime "updated_at", :null => false
611
+ end
612
+
613
+ end
Binary file
@@ -0,0 +1 @@
1
+ Connecting to database specified by database.yml