erp_tech_svcs 3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/GPL-3-LICENSE +674 -0
- data/README.rdoc +2 -0
- data/Rakefile +30 -0
- data/app/assets/javascripts/erp_tech_svcs/application.js +9 -0
- data/app/assets/stylesheets/erp_tech_svcs/application.css +7 -0
- data/app/controllers/erp_tech_svcs/session_controller.rb +19 -0
- data/app/controllers/erp_tech_svcs/user_controller.rb +40 -0
- data/app/helpers/erp_tech_svcs/application_helper.rb +4 -0
- data/app/mailers/user_mailer.rb +16 -0
- data/app/models/audit_log.rb +60 -0
- data/app/models/audit_log_item.rb +4 -0
- data/app/models/audit_log_item_type.rb +6 -0
- data/app/models/audit_log_type.rb +24 -0
- data/app/models/capability.rb +8 -0
- data/app/models/capability_type.rb +3 -0
- data/app/models/capable_model.rb +4 -0
- data/app/models/encryption_key.rb +9 -0
- data/app/models/extensions/contact_purpose.rb +3 -0
- data/app/models/extensions/contact_type.rb +3 -0
- data/app/models/extensions/note.rb +6 -0
- data/app/models/extensions/note_type.rb +3 -0
- data/app/models/extensions/party.rb +3 -0
- data/app/models/extensions/relationship_type.rb +3 -0
- data/app/models/extensions/role_type.rb +3 -0
- data/app/models/file_asset.rb +178 -0
- data/app/models/role.rb +17 -0
- data/app/models/secured_model.rb +13 -0
- data/app/models/user.rb +33 -0
- data/app/views/layouts/application.html.erb +14 -0
- data/app/views/layouts/erp_tech_svcs/application.html.erb +14 -0
- data/app/views/user_mailer/activation_needed_email.html.erb +14 -0
- data/app/views/user_mailer/reset_password_email.html.erb +14 -0
- data/config/initializers/erp_tech_svcs.rb +7 -0
- data/config/initializers/file_support.rb +1 -0
- data/config/initializers/pdfkit.rb +18 -0
- data/config/initializers/sorcery.rb +199 -0
- data/config/routes.rb +9 -0
- data/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.rb +15 -0
- data/db/data_migrations/20111111144706_setup_audit_log_types.rb +21 -0
- data/db/migrate/20080805000010_base_tech_services.rb +247 -0
- data/db/migrate/20111109161549_add_capabilites.rb +56 -0
- data/db/migrate/upgrade/20111109161550_update_roles.rb +33 -0
- data/db/migrate/upgrade/20111109161551_update_user.rb +88 -0
- data/lib/erp_tech_svcs/application_installer.rb +102 -0
- data/lib/erp_tech_svcs/config.rb +27 -0
- data/lib/erp_tech_svcs/engine.rb +14 -0
- data/lib/erp_tech_svcs/extensions/active_record/acts_as_versioned.rb +494 -0
- data/lib/erp_tech_svcs/extensions/active_record/has_capabilities.rb +139 -0
- data/lib/erp_tech_svcs/extensions/active_record/has_file_assets.rb +40 -0
- data/lib/erp_tech_svcs/extensions/active_record/has_roles.rb +126 -0
- data/lib/erp_tech_svcs/extensions.rb +5 -0
- data/lib/erp_tech_svcs/file_support/aws_s3_patch.rb +3 -0
- data/lib/erp_tech_svcs/file_support/base.rb +30 -0
- data/lib/erp_tech_svcs/file_support/file_manipulator.rb +37 -0
- data/lib/erp_tech_svcs/file_support/file_system_manager.rb +167 -0
- data/lib/erp_tech_svcs/file_support/manager.rb +147 -0
- data/lib/erp_tech_svcs/file_support/paperclip_patch.rb +28 -0
- data/lib/erp_tech_svcs/file_support/railties/s3_resolver.rb +79 -0
- data/lib/erp_tech_svcs/file_support/s3_manager.rb +211 -0
- data/lib/erp_tech_svcs/file_support.rb +10 -0
- data/lib/erp_tech_svcs/sessions/delete_expired_sessions_job.rb +40 -0
- data/lib/erp_tech_svcs/sessions/delete_expired_sessions_service.rb +15 -0
- data/lib/erp_tech_svcs/utils/attachment_fu_patch.rb +15 -0
- data/lib/erp_tech_svcs/utils/compass_access_negotiator.rb +57 -0
- data/lib/erp_tech_svcs/utils/compass_logger.rb +94 -0
- data/lib/erp_tech_svcs/utils/compass_pdf.rb +72 -0
- data/lib/erp_tech_svcs/utils/default_nested_set_methods.rb +33 -0
- data/lib/erp_tech_svcs/utils/pdf_processor.rb +106 -0
- data/lib/erp_tech_svcs/version.rb +3 -0
- data/lib/erp_tech_svcs.rb +20 -0
- data/lib/tasks/erp_tech_svcs_tasks.rake +42 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +9 -0
- data/spec/dummy/app/assets/stylesheets/application.css +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/config/application.rb +43 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +8 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/spec.rb +27 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +12 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/db/schema.rb +571 -0
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +2862 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/capability_type.rb +5 -0
- data/spec/factories/role.rb +5 -0
- data/spec/factories/users.rb +9 -0
- data/spec/lib/erp_tech_svcs/extensions/active_record/has_roles_spec.rb +68 -0
- data/spec/models/audit_log_spec.rb +48 -0
- data/spec/models/audit_log_type_spec.rb +9 -0
- data/spec/models/role_spec.rb +17 -0
- data/spec/models/user_spec.rb +27 -0
- data/spec/spec_helper.rb +61 -0
- metadata +273 -0
@@ -0,0 +1,571 @@
|
|
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 => 20111109161549) do
|
15
|
+
|
16
|
+
create_table "audit_log_item_types", :force => true do |t|
|
17
|
+
t.string "internal_identifier"
|
18
|
+
t.string "external_identifier"
|
19
|
+
t.string "external_id_source"
|
20
|
+
t.string "description"
|
21
|
+
t.string "comments"
|
22
|
+
t.integer "parent_id"
|
23
|
+
t.integer "lft"
|
24
|
+
t.integer "rgt"
|
25
|
+
t.datetime "created_at"
|
26
|
+
t.datetime "updated_at"
|
27
|
+
end
|
28
|
+
|
29
|
+
create_table "audit_log_items", :force => true do |t|
|
30
|
+
t.integer "audit_log_id"
|
31
|
+
t.integer "audit_log_item_type_id"
|
32
|
+
t.string "audit_log_item_value"
|
33
|
+
t.string "description"
|
34
|
+
t.datetime "created_at"
|
35
|
+
t.datetime "updated_at"
|
36
|
+
end
|
37
|
+
|
38
|
+
create_table "audit_log_types", :force => true do |t|
|
39
|
+
t.string "description"
|
40
|
+
t.string "error_code"
|
41
|
+
t.string "comments"
|
42
|
+
t.string "internal_identifier"
|
43
|
+
t.string "external_identifier"
|
44
|
+
t.string "external_id_source"
|
45
|
+
t.integer "parent_id"
|
46
|
+
t.integer "lft"
|
47
|
+
t.integer "rgt"
|
48
|
+
t.datetime "created_at"
|
49
|
+
t.datetime "updated_at"
|
50
|
+
end
|
51
|
+
|
52
|
+
create_table "audit_logs", :force => true do |t|
|
53
|
+
t.string "application"
|
54
|
+
t.string "description"
|
55
|
+
t.integer "party_id"
|
56
|
+
t.text "additional_info"
|
57
|
+
t.integer "audit_log_type_id"
|
58
|
+
t.integer "event_record_id"
|
59
|
+
t.string "event_record_type"
|
60
|
+
t.datetime "created_at"
|
61
|
+
t.datetime "updated_at"
|
62
|
+
end
|
63
|
+
|
64
|
+
add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
|
65
|
+
add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
|
66
|
+
|
67
|
+
create_table "capabilities", :force => true do |t|
|
68
|
+
t.string "resource"
|
69
|
+
t.integer "capability_type_id"
|
70
|
+
t.datetime "created_at"
|
71
|
+
t.datetime "updated_at"
|
72
|
+
end
|
73
|
+
|
74
|
+
add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
|
75
|
+
|
76
|
+
create_table "capabilities_capable_models", :id => false, :force => true do |t|
|
77
|
+
t.integer "capable_model_id"
|
78
|
+
t.integer "capability_id"
|
79
|
+
t.datetime "created_at"
|
80
|
+
t.datetime "updated_at"
|
81
|
+
end
|
82
|
+
|
83
|
+
add_index "capabilities_capable_models", ["capability_id"], :name => "index_capabilities_capable_models_on_capability_id"
|
84
|
+
add_index "capabilities_capable_models", ["capable_model_id"], :name => "index_capabilities_capable_models_on_capable_model_id"
|
85
|
+
|
86
|
+
create_table "capability_types", :force => true do |t|
|
87
|
+
t.string "internal_identifier"
|
88
|
+
t.string "description"
|
89
|
+
t.datetime "created_at"
|
90
|
+
t.datetime "updated_at"
|
91
|
+
end
|
92
|
+
|
93
|
+
create_table "capable_models", :force => true do |t|
|
94
|
+
t.integer "capable_model_record_id"
|
95
|
+
t.string "capable_model_record_type"
|
96
|
+
t.datetime "created_at"
|
97
|
+
t.datetime "updated_at"
|
98
|
+
end
|
99
|
+
|
100
|
+
add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
|
101
|
+
|
102
|
+
create_table "categories", :force => true do |t|
|
103
|
+
t.string "description"
|
104
|
+
t.string "external_identifier"
|
105
|
+
t.datetime "from_date"
|
106
|
+
t.datetime "to_date"
|
107
|
+
t.string "internal_identifier"
|
108
|
+
t.integer "category_record_id"
|
109
|
+
t.string "category_record_type"
|
110
|
+
t.integer "parent_id"
|
111
|
+
t.integer "lft"
|
112
|
+
t.integer "rgt"
|
113
|
+
t.datetime "created_at"
|
114
|
+
t.datetime "updated_at"
|
115
|
+
end
|
116
|
+
|
117
|
+
add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
|
118
|
+
|
119
|
+
create_table "category_classifications", :force => true do |t|
|
120
|
+
t.integer "category_id"
|
121
|
+
t.string "classification_type"
|
122
|
+
t.integer "classification_id"
|
123
|
+
t.datetime "from_date"
|
124
|
+
t.datetime "to_date"
|
125
|
+
t.datetime "created_at"
|
126
|
+
t.datetime "updated_at"
|
127
|
+
end
|
128
|
+
|
129
|
+
add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
|
130
|
+
|
131
|
+
create_table "compass_ae_instances", :force => true do |t|
|
132
|
+
t.decimal "version"
|
133
|
+
t.datetime "created_at"
|
134
|
+
t.datetime "updated_at"
|
135
|
+
end
|
136
|
+
|
137
|
+
create_table "contact_purposes", :force => true do |t|
|
138
|
+
t.integer "parent_id"
|
139
|
+
t.integer "lft"
|
140
|
+
t.integer "rgt"
|
141
|
+
t.string "description"
|
142
|
+
t.string "comments"
|
143
|
+
t.string "internal_identifier"
|
144
|
+
t.string "external_identifier"
|
145
|
+
t.string "external_id_source"
|
146
|
+
t.datetime "created_at"
|
147
|
+
t.datetime "updated_at"
|
148
|
+
end
|
149
|
+
|
150
|
+
add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
|
151
|
+
|
152
|
+
create_table "contact_purposes_contacts", :id => false, :force => true do |t|
|
153
|
+
t.integer "contact_id"
|
154
|
+
t.integer "contact_purpose_id"
|
155
|
+
end
|
156
|
+
|
157
|
+
add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
|
158
|
+
|
159
|
+
create_table "contact_types", :force => true do |t|
|
160
|
+
t.integer "parent_id"
|
161
|
+
t.integer "lft"
|
162
|
+
t.integer "rgt"
|
163
|
+
t.string "description"
|
164
|
+
t.string "comments"
|
165
|
+
t.string "internal_identifier"
|
166
|
+
t.string "external_identifier"
|
167
|
+
t.string "external_id_source"
|
168
|
+
t.datetime "created_at"
|
169
|
+
t.datetime "updated_at"
|
170
|
+
end
|
171
|
+
|
172
|
+
add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
|
173
|
+
|
174
|
+
create_table "contacts", :force => true do |t|
|
175
|
+
t.integer "party_id"
|
176
|
+
t.integer "contact_mechanism_id"
|
177
|
+
t.string "contact_mechanism_type"
|
178
|
+
t.string "external_identifier"
|
179
|
+
t.string "external_id_source"
|
180
|
+
t.datetime "created_at"
|
181
|
+
t.datetime "updated_at"
|
182
|
+
end
|
183
|
+
|
184
|
+
add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
|
185
|
+
add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
|
186
|
+
|
187
|
+
create_table "currencies", :force => true do |t|
|
188
|
+
t.string "name"
|
189
|
+
t.string "definition"
|
190
|
+
t.string "internal_identifier"
|
191
|
+
t.string "numeric_code"
|
192
|
+
t.string "major_unit_symbol"
|
193
|
+
t.string "minor_unit_symbol"
|
194
|
+
t.string "ratio_of_minor_unit_to_major_unit"
|
195
|
+
t.string "postfix_label"
|
196
|
+
t.datetime "introduction_date"
|
197
|
+
t.datetime "expiration_date"
|
198
|
+
t.datetime "created_at"
|
199
|
+
t.datetime "updated_at"
|
200
|
+
end
|
201
|
+
|
202
|
+
add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
|
203
|
+
|
204
|
+
create_table "delayed_jobs", :force => true do |t|
|
205
|
+
t.integer "priority", :default => 0
|
206
|
+
t.integer "attempts", :default => 0
|
207
|
+
t.text "handler"
|
208
|
+
t.text "last_error"
|
209
|
+
t.datetime "run_at"
|
210
|
+
t.datetime "locked_at"
|
211
|
+
t.datetime "failed_at"
|
212
|
+
t.string "locked_by"
|
213
|
+
t.datetime "created_at"
|
214
|
+
t.datetime "updated_at"
|
215
|
+
end
|
216
|
+
|
217
|
+
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
218
|
+
|
219
|
+
create_table "descriptive_assets", :force => true do |t|
|
220
|
+
t.integer "view_type_id"
|
221
|
+
t.string "internal_identifier"
|
222
|
+
t.text "description"
|
223
|
+
t.string "external_identifier"
|
224
|
+
t.string "external_id_source"
|
225
|
+
t.integer "described_record_id"
|
226
|
+
t.string "described_record_type"
|
227
|
+
t.datetime "created_at"
|
228
|
+
t.datetime "updated_at"
|
229
|
+
end
|
230
|
+
|
231
|
+
add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
|
232
|
+
add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
|
233
|
+
|
234
|
+
create_table "email_addresses", :force => true do |t|
|
235
|
+
t.string "email_address"
|
236
|
+
t.string "description"
|
237
|
+
t.datetime "created_at"
|
238
|
+
t.datetime "updated_at"
|
239
|
+
end
|
240
|
+
|
241
|
+
create_table "file_assets", :force => true do |t|
|
242
|
+
t.integer "file_asset_holder_id"
|
243
|
+
t.string "file_asset_holder_type"
|
244
|
+
t.string "type"
|
245
|
+
t.string "name"
|
246
|
+
t.string "directory"
|
247
|
+
t.string "data_file_name"
|
248
|
+
t.string "data_content_type"
|
249
|
+
t.integer "data_file_size"
|
250
|
+
t.datetime "data_updated_at"
|
251
|
+
t.datetime "created_at"
|
252
|
+
t.datetime "updated_at"
|
253
|
+
end
|
254
|
+
|
255
|
+
add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
|
256
|
+
add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
|
257
|
+
|
258
|
+
create_table "geo_countries", :force => true do |t|
|
259
|
+
t.string "name"
|
260
|
+
t.string "iso_code_2"
|
261
|
+
t.string "iso_code_3"
|
262
|
+
t.boolean "display", :default => true
|
263
|
+
t.integer "external_id"
|
264
|
+
t.datetime "created_at"
|
265
|
+
end
|
266
|
+
|
267
|
+
add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
|
268
|
+
add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
|
269
|
+
|
270
|
+
create_table "geo_zones", :force => true do |t|
|
271
|
+
t.integer "geo_country_id"
|
272
|
+
t.string "zone_code", :default => "2"
|
273
|
+
t.string "zone_name"
|
274
|
+
t.datetime "created_at"
|
275
|
+
end
|
276
|
+
|
277
|
+
add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
|
278
|
+
add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
|
279
|
+
add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
|
280
|
+
|
281
|
+
create_table "individuals", :force => true do |t|
|
282
|
+
t.integer "party_id"
|
283
|
+
t.string "current_last_name"
|
284
|
+
t.string "current_first_name"
|
285
|
+
t.string "current_middle_name"
|
286
|
+
t.string "current_personal_title"
|
287
|
+
t.string "current_suffix"
|
288
|
+
t.string "current_nickname"
|
289
|
+
t.string "gender", :limit => 1
|
290
|
+
t.date "birth_date"
|
291
|
+
t.decimal "height", :precision => 5, :scale => 2
|
292
|
+
t.integer "weight"
|
293
|
+
t.string "mothers_maiden_name"
|
294
|
+
t.string "marital_status", :limit => 1
|
295
|
+
t.string "social_security_number"
|
296
|
+
t.integer "current_passport_number"
|
297
|
+
t.date "current_passport_expire_date"
|
298
|
+
t.integer "total_years_work_experience"
|
299
|
+
t.string "comments"
|
300
|
+
t.string "encrypted_ssn"
|
301
|
+
t.string "temp_ssn"
|
302
|
+
t.string "salt"
|
303
|
+
t.string "ssn_last_four"
|
304
|
+
t.datetime "created_at"
|
305
|
+
t.datetime "updated_at"
|
306
|
+
end
|
307
|
+
|
308
|
+
add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
|
309
|
+
|
310
|
+
create_table "money", :force => true do |t|
|
311
|
+
t.string "description"
|
312
|
+
t.float "amount"
|
313
|
+
t.integer "currency_id"
|
314
|
+
t.datetime "created_at"
|
315
|
+
t.datetime "updated_at"
|
316
|
+
end
|
317
|
+
|
318
|
+
add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
|
319
|
+
|
320
|
+
create_table "note_types", :force => true do |t|
|
321
|
+
t.integer "parent_id"
|
322
|
+
t.integer "lft"
|
323
|
+
t.integer "rgt"
|
324
|
+
t.string "description"
|
325
|
+
t.string "internal_identifier"
|
326
|
+
t.string "external_identifier"
|
327
|
+
t.integer "note_type_record_id"
|
328
|
+
t.string "note_type_record_type"
|
329
|
+
t.datetime "created_at"
|
330
|
+
t.datetime "updated_at"
|
331
|
+
end
|
332
|
+
|
333
|
+
add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
|
334
|
+
|
335
|
+
create_table "notes", :force => true do |t|
|
336
|
+
t.integer "created_by_id"
|
337
|
+
t.text "content"
|
338
|
+
t.integer "noted_record_id"
|
339
|
+
t.string "noted_record_type"
|
340
|
+
t.integer "note_type_id"
|
341
|
+
t.datetime "created_at"
|
342
|
+
t.datetime "updated_at"
|
343
|
+
end
|
344
|
+
|
345
|
+
add_index "notes", ["content"], :name => "index_notes_on_content"
|
346
|
+
add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
|
347
|
+
add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
|
348
|
+
add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
|
349
|
+
|
350
|
+
create_table "organizations", :force => true do |t|
|
351
|
+
t.string "description"
|
352
|
+
t.string "tax_id_number"
|
353
|
+
t.datetime "created_at"
|
354
|
+
t.datetime "updated_at"
|
355
|
+
end
|
356
|
+
|
357
|
+
create_table "parties", :force => true do |t|
|
358
|
+
t.string "description"
|
359
|
+
t.integer "business_party_id"
|
360
|
+
t.string "business_party_type"
|
361
|
+
t.integer "list_view_image_id"
|
362
|
+
t.string "enterprise_identifier"
|
363
|
+
t.datetime "created_at"
|
364
|
+
t.datetime "updated_at"
|
365
|
+
end
|
366
|
+
|
367
|
+
add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
|
368
|
+
|
369
|
+
create_table "party_relationships", :force => true do |t|
|
370
|
+
t.string "description"
|
371
|
+
t.integer "party_id_from"
|
372
|
+
t.integer "party_id_to"
|
373
|
+
t.integer "role_type_id_from"
|
374
|
+
t.integer "role_type_id_to"
|
375
|
+
t.integer "status_type_id"
|
376
|
+
t.integer "priority_type_id"
|
377
|
+
t.integer "relationship_type_id"
|
378
|
+
t.date "from_date"
|
379
|
+
t.date "thru_date"
|
380
|
+
t.string "external_identifier"
|
381
|
+
t.string "external_id_source"
|
382
|
+
t.datetime "created_at"
|
383
|
+
t.datetime "updated_at"
|
384
|
+
end
|
385
|
+
|
386
|
+
add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
|
387
|
+
add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
|
388
|
+
add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
|
389
|
+
|
390
|
+
create_table "party_roles", :force => true do |t|
|
391
|
+
t.string "type"
|
392
|
+
t.integer "party_id"
|
393
|
+
t.integer "role_type_id"
|
394
|
+
t.datetime "created_at"
|
395
|
+
t.datetime "updated_at"
|
396
|
+
end
|
397
|
+
|
398
|
+
add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
|
399
|
+
add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
|
400
|
+
|
401
|
+
create_table "party_search_facts", :force => true do |t|
|
402
|
+
t.integer "party_id"
|
403
|
+
t.string "eid"
|
404
|
+
t.string "type"
|
405
|
+
t.text "roles"
|
406
|
+
t.string "party_description"
|
407
|
+
t.string "party_business_party_type"
|
408
|
+
t.string "user_login"
|
409
|
+
t.string "individual_current_last_name"
|
410
|
+
t.string "individual_current_first_name"
|
411
|
+
t.string "individual_current_middle_name"
|
412
|
+
t.string "individual_birth_date"
|
413
|
+
t.string "individual_ssn"
|
414
|
+
t.string "party_phone_number"
|
415
|
+
t.string "party_email_address"
|
416
|
+
t.string "party_address_1"
|
417
|
+
t.string "party_address_2"
|
418
|
+
t.string "party_primary_address_city"
|
419
|
+
t.string "party_primary_address_state"
|
420
|
+
t.string "party_primary_address_zip"
|
421
|
+
t.string "party_primary_address_country"
|
422
|
+
t.boolean "user_enabled"
|
423
|
+
t.string "user_type"
|
424
|
+
t.boolean "reindex"
|
425
|
+
t.datetime "created_at"
|
426
|
+
t.datetime "updated_at"
|
427
|
+
end
|
428
|
+
|
429
|
+
create_table "phone_numbers", :force => true do |t|
|
430
|
+
t.string "phone_number"
|
431
|
+
t.string "description"
|
432
|
+
t.datetime "created_at"
|
433
|
+
t.datetime "updated_at"
|
434
|
+
end
|
435
|
+
|
436
|
+
create_table "postal_addresses", :force => true do |t|
|
437
|
+
t.string "address_line_1"
|
438
|
+
t.string "address_line_2"
|
439
|
+
t.string "city"
|
440
|
+
t.string "state"
|
441
|
+
t.string "zip"
|
442
|
+
t.string "country"
|
443
|
+
t.string "description"
|
444
|
+
t.integer "geo_country_id"
|
445
|
+
t.integer "geo_zone_id"
|
446
|
+
t.datetime "created_at"
|
447
|
+
t.datetime "updated_at"
|
448
|
+
end
|
449
|
+
|
450
|
+
add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
|
451
|
+
add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
|
452
|
+
|
453
|
+
create_table "relationship_types", :force => true do |t|
|
454
|
+
t.integer "parent_id"
|
455
|
+
t.integer "lft"
|
456
|
+
t.integer "rgt"
|
457
|
+
t.integer "valid_from_role_type_id"
|
458
|
+
t.integer "valid_to_role_type_id"
|
459
|
+
t.string "name"
|
460
|
+
t.string "description"
|
461
|
+
t.string "internal_identifier"
|
462
|
+
t.string "external_identifier"
|
463
|
+
t.string "external_id_source"
|
464
|
+
t.datetime "created_at"
|
465
|
+
t.datetime "updated_at"
|
466
|
+
end
|
467
|
+
|
468
|
+
add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
|
469
|
+
add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
|
470
|
+
|
471
|
+
create_table "role_types", :force => true do |t|
|
472
|
+
t.integer "parent_id"
|
473
|
+
t.integer "lft"
|
474
|
+
t.integer "rgt"
|
475
|
+
t.string "description"
|
476
|
+
t.string "comments"
|
477
|
+
t.string "internal_identifier"
|
478
|
+
t.string "external_identifier"
|
479
|
+
t.string "external_id_source"
|
480
|
+
t.datetime "created_at"
|
481
|
+
t.datetime "updated_at"
|
482
|
+
end
|
483
|
+
|
484
|
+
create_table "roles", :force => true do |t|
|
485
|
+
t.string "description"
|
486
|
+
t.string "internal_identifier"
|
487
|
+
t.string "external_identifier"
|
488
|
+
t.string "external_id_source"
|
489
|
+
t.datetime "created_at"
|
490
|
+
t.datetime "updated_at"
|
491
|
+
end
|
492
|
+
|
493
|
+
create_table "roles_secured_models", :id => false, :force => true do |t|
|
494
|
+
t.integer "secured_model_id"
|
495
|
+
t.integer "role_id"
|
496
|
+
t.datetime "created_at"
|
497
|
+
t.datetime "updated_at"
|
498
|
+
end
|
499
|
+
|
500
|
+
add_index "roles_secured_models", ["role_id"], :name => "index_roles_secured_models_on_role_id"
|
501
|
+
add_index "roles_secured_models", ["secured_model_id"], :name => "index_roles_secured_models_on_secured_model_id"
|
502
|
+
|
503
|
+
create_table "secured_models", :force => true do |t|
|
504
|
+
t.integer "secured_record_id"
|
505
|
+
t.string "secured_record_type"
|
506
|
+
t.datetime "created_at"
|
507
|
+
t.datetime "updated_at"
|
508
|
+
end
|
509
|
+
|
510
|
+
add_index "secured_models", ["secured_record_id", "secured_record_type"], :name => "secured_record_idx"
|
511
|
+
|
512
|
+
create_table "sessions", :force => true do |t|
|
513
|
+
t.string "session_id", :null => false
|
514
|
+
t.text "data"
|
515
|
+
t.datetime "created_at"
|
516
|
+
t.datetime "updated_at"
|
517
|
+
end
|
518
|
+
|
519
|
+
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
|
520
|
+
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
|
521
|
+
|
522
|
+
create_table "users", :force => true do |t|
|
523
|
+
t.string "username"
|
524
|
+
t.string "email"
|
525
|
+
t.integer "party_id"
|
526
|
+
t.string "type"
|
527
|
+
t.string "salt"
|
528
|
+
t.string "crypted_password"
|
529
|
+
t.datetime "last_login_at"
|
530
|
+
t.datetime "last_logout_at"
|
531
|
+
t.datetime "last_activity_at"
|
532
|
+
t.integer "failed_logins_count", :default => 0
|
533
|
+
t.datetime "lock_expires_at"
|
534
|
+
t.string "remember_me_token"
|
535
|
+
t.datetime "remember_me_token_expires_at"
|
536
|
+
t.string "reset_password_token"
|
537
|
+
t.datetime "reset_password_token_expires_at"
|
538
|
+
t.datetime "reset_password_email_sent_at"
|
539
|
+
t.string "activation_state"
|
540
|
+
t.string "activation_token"
|
541
|
+
t.datetime "activation_token_expires_at"
|
542
|
+
t.datetime "created_at"
|
543
|
+
t.datetime "updated_at"
|
544
|
+
end
|
545
|
+
|
546
|
+
add_index "users", ["activation_token"], :name => "index_users_on_activation_token", :unique => true
|
547
|
+
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
548
|
+
add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx", :unique => true
|
549
|
+
add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token", :unique => true
|
550
|
+
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token", :unique => true
|
551
|
+
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
552
|
+
|
553
|
+
create_table "valid_note_types", :force => true do |t|
|
554
|
+
t.integer "valid_note_type_record_id"
|
555
|
+
t.string "valid_note_type_record_type"
|
556
|
+
t.integer "note_type_id"
|
557
|
+
t.datetime "created_at"
|
558
|
+
t.datetime "updated_at"
|
559
|
+
end
|
560
|
+
|
561
|
+
add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
|
562
|
+
add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
|
563
|
+
|
564
|
+
create_table "view_types", :force => true do |t|
|
565
|
+
t.string "internal_identifier"
|
566
|
+
t.string "description"
|
567
|
+
t.datetime "created_at"
|
568
|
+
t.datetime "updated_at"
|
569
|
+
end
|
570
|
+
|
571
|
+
end
|
Binary file
|