erp_base_erp_svcs 3.0.7 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/category.rb +2 -1
- data/app/models/category_classification.rb +2 -0
- data/app/models/compass_ae_instance.rb +1 -1
- data/app/models/contact.rb +34 -32
- data/app/models/contact_purpose.rb +6 -4
- data/app/models/contact_type.rb +3 -1
- data/app/models/currency.rb +6 -4
- data/app/models/descriptive_asset.rb +2 -0
- data/app/models/email_address.rb +2 -0
- data/app/models/geo_country.rb +2 -0
- data/app/models/geo_zone.rb +2 -0
- data/app/models/individual.rb +2 -0
- data/app/models/iso_country_code.rb +0 -1
- data/app/models/money.rb +1 -0
- data/app/models/note.rb +2 -0
- data/app/models/note_type.rb +2 -0
- data/app/models/organization.rb +2 -0
- data/app/models/party.rb +4 -3
- data/app/models/party_relationship.rb +6 -5
- data/app/models/party_role.rb +7 -5
- data/app/models/phone_number.rb +2 -0
- data/app/models/postal_address.rb +2 -0
- data/app/models/relationship_type.rb +7 -5
- data/app/models/role_type.rb +2 -0
- data/app/models/valid_note_type.rb +2 -0
- data/app/models/view_type.rb +2 -0
- data/db/data_migrations/20110913145838_setup_compass_ae_instance.rb +1 -1
- data/db/migrate/20080805000020_base_erp_services.rb +222 -222
- data/lib/erp_base_erp_svcs/engine.rb +2 -0
- data/lib/erp_base_erp_svcs/extensions/active_record/migration.rb +39 -0
- data/lib/erp_base_erp_svcs/extensions.rb +1 -2
- data/lib/erp_base_erp_svcs/version.rb +2 -2
- data/lib/erp_base_erp_svcs.rb +15 -15
- data/lib/tasks/erp_base_erp_svcs_tasks.rake +58 -23
- data/spec/dummy/config/application.rb +6 -0
- data/spec/dummy/config/environments/spec.rb +3 -0
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +19 -0
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +12 -0
- data/spec/dummy/db/migrate/20130107214414_base_erp_services.erp_base_erp_svcs.rb +461 -0
- data/spec/dummy/db/schema.rb +383 -0
- data/spec/dummy/db/spec.sqlite3 +0 -0
- data/spec/dummy/log/spec.log +17576 -0
- data/spec/models/email_address_spec.rb +1 -1
- data/spec/models/party_spec.rb +19 -19
- data/spec/spec_helper.rb +14 -5
- metadata +70 -149
- data/db/migrate/20110913145329_create_compass_ae_instance.rb +0 -15
- data/db/migrate/upgrade/20110907171257_add_notes.rb +0 -63
- data/lib/erp_base_erp_svcs/extensions/active_record/data_migrator.rb +0 -46
- data/lib/erp_base_erp_svcs/extensions/active_record/migrator.rb +0 -76
@@ -0,0 +1,383 @@
|
|
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 => 20130107214414) do
|
15
|
+
|
16
|
+
create_table "categories", :force => true do |t|
|
17
|
+
t.string "description"
|
18
|
+
t.string "external_identifier"
|
19
|
+
t.datetime "from_date"
|
20
|
+
t.datetime "to_date"
|
21
|
+
t.string "internal_identifier"
|
22
|
+
t.integer "category_record_id"
|
23
|
+
t.string "category_record_type"
|
24
|
+
t.integer "parent_id"
|
25
|
+
t.integer "lft"
|
26
|
+
t.integer "rgt"
|
27
|
+
t.datetime "created_at", :null => false
|
28
|
+
t.datetime "updated_at", :null => false
|
29
|
+
end
|
30
|
+
|
31
|
+
add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
|
32
|
+
|
33
|
+
create_table "category_classifications", :force => true do |t|
|
34
|
+
t.integer "category_id"
|
35
|
+
t.string "classification_type"
|
36
|
+
t.integer "classification_id"
|
37
|
+
t.datetime "from_date"
|
38
|
+
t.datetime "to_date"
|
39
|
+
t.datetime "created_at", :null => false
|
40
|
+
t.datetime "updated_at", :null => false
|
41
|
+
end
|
42
|
+
|
43
|
+
add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
|
44
|
+
|
45
|
+
create_table "compass_ae_instances", :force => true do |t|
|
46
|
+
t.decimal "version", :precision => 8, :scale => 3
|
47
|
+
t.datetime "created_at", :null => false
|
48
|
+
t.datetime "updated_at", :null => false
|
49
|
+
end
|
50
|
+
|
51
|
+
create_table "contact_purposes", :force => true do |t|
|
52
|
+
t.integer "parent_id"
|
53
|
+
t.integer "lft"
|
54
|
+
t.integer "rgt"
|
55
|
+
t.string "description"
|
56
|
+
t.string "comments"
|
57
|
+
t.string "internal_identifier"
|
58
|
+
t.string "external_identifier"
|
59
|
+
t.string "external_id_source"
|
60
|
+
t.datetime "created_at", :null => false
|
61
|
+
t.datetime "updated_at", :null => false
|
62
|
+
end
|
63
|
+
|
64
|
+
add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
|
65
|
+
|
66
|
+
create_table "contact_purposes_contacts", :id => false, :force => true do |t|
|
67
|
+
t.integer "contact_id"
|
68
|
+
t.integer "contact_purpose_id"
|
69
|
+
end
|
70
|
+
|
71
|
+
add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
|
72
|
+
|
73
|
+
create_table "contact_types", :force => true do |t|
|
74
|
+
t.integer "parent_id"
|
75
|
+
t.integer "lft"
|
76
|
+
t.integer "rgt"
|
77
|
+
t.string "description"
|
78
|
+
t.string "comments"
|
79
|
+
t.string "internal_identifier"
|
80
|
+
t.string "external_identifier"
|
81
|
+
t.string "external_id_source"
|
82
|
+
t.datetime "created_at", :null => false
|
83
|
+
t.datetime "updated_at", :null => false
|
84
|
+
end
|
85
|
+
|
86
|
+
add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
|
87
|
+
|
88
|
+
create_table "contacts", :force => true do |t|
|
89
|
+
t.integer "party_id"
|
90
|
+
t.integer "contact_mechanism_id"
|
91
|
+
t.string "contact_mechanism_type"
|
92
|
+
t.string "external_identifier"
|
93
|
+
t.string "external_id_source"
|
94
|
+
t.datetime "created_at", :null => false
|
95
|
+
t.datetime "updated_at", :null => false
|
96
|
+
end
|
97
|
+
|
98
|
+
add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
|
99
|
+
add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
|
100
|
+
|
101
|
+
create_table "currencies", :force => true do |t|
|
102
|
+
t.string "name"
|
103
|
+
t.string "definition"
|
104
|
+
t.string "internal_identifier"
|
105
|
+
t.string "numeric_code"
|
106
|
+
t.string "major_unit_symbol"
|
107
|
+
t.string "minor_unit_symbol"
|
108
|
+
t.string "ratio_of_minor_unit_to_major_unit"
|
109
|
+
t.string "postfix_label"
|
110
|
+
t.datetime "introduction_date"
|
111
|
+
t.datetime "expiration_date"
|
112
|
+
t.datetime "created_at", :null => false
|
113
|
+
t.datetime "updated_at", :null => false
|
114
|
+
end
|
115
|
+
|
116
|
+
add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
|
117
|
+
|
118
|
+
create_table "descriptive_assets", :force => true do |t|
|
119
|
+
t.integer "view_type_id"
|
120
|
+
t.string "internal_identifier"
|
121
|
+
t.text "description"
|
122
|
+
t.string "external_identifier"
|
123
|
+
t.string "external_id_source"
|
124
|
+
t.integer "described_record_id"
|
125
|
+
t.string "described_record_type"
|
126
|
+
t.datetime "created_at", :null => false
|
127
|
+
t.datetime "updated_at", :null => false
|
128
|
+
end
|
129
|
+
|
130
|
+
add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
|
131
|
+
add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
|
132
|
+
|
133
|
+
create_table "email_addresses", :force => true do |t|
|
134
|
+
t.string "email_address"
|
135
|
+
t.string "description"
|
136
|
+
t.datetime "created_at", :null => false
|
137
|
+
t.datetime "updated_at", :null => false
|
138
|
+
end
|
139
|
+
|
140
|
+
create_table "geo_countries", :force => true do |t|
|
141
|
+
t.string "name"
|
142
|
+
t.string "iso_code_2"
|
143
|
+
t.string "iso_code_3"
|
144
|
+
t.boolean "display", :default => true
|
145
|
+
t.integer "external_id"
|
146
|
+
t.datetime "created_at"
|
147
|
+
end
|
148
|
+
|
149
|
+
add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
|
150
|
+
add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
|
151
|
+
|
152
|
+
create_table "geo_zones", :force => true do |t|
|
153
|
+
t.integer "geo_country_id"
|
154
|
+
t.string "zone_code", :default => "2"
|
155
|
+
t.string "zone_name"
|
156
|
+
t.datetime "created_at"
|
157
|
+
end
|
158
|
+
|
159
|
+
add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
|
160
|
+
add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
|
161
|
+
add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
|
162
|
+
|
163
|
+
create_table "individuals", :force => true do |t|
|
164
|
+
t.integer "party_id"
|
165
|
+
t.string "current_last_name"
|
166
|
+
t.string "current_first_name"
|
167
|
+
t.string "current_middle_name"
|
168
|
+
t.string "current_personal_title"
|
169
|
+
t.string "current_suffix"
|
170
|
+
t.string "current_nickname"
|
171
|
+
t.string "gender", :limit => 1
|
172
|
+
t.date "birth_date"
|
173
|
+
t.decimal "height", :precision => 5, :scale => 2
|
174
|
+
t.integer "weight"
|
175
|
+
t.string "mothers_maiden_name"
|
176
|
+
t.string "marital_status", :limit => 1
|
177
|
+
t.string "social_security_number"
|
178
|
+
t.integer "current_passport_number"
|
179
|
+
t.date "current_passport_expire_date"
|
180
|
+
t.integer "total_years_work_experience"
|
181
|
+
t.string "comments"
|
182
|
+
t.string "encrypted_ssn"
|
183
|
+
t.string "temp_ssn"
|
184
|
+
t.string "salt"
|
185
|
+
t.string "ssn_last_four"
|
186
|
+
t.datetime "created_at", :null => false
|
187
|
+
t.datetime "updated_at", :null => false
|
188
|
+
end
|
189
|
+
|
190
|
+
add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
|
191
|
+
|
192
|
+
create_table "money", :force => true do |t|
|
193
|
+
t.string "description"
|
194
|
+
t.decimal "amount", :precision => 8, :scale => 2
|
195
|
+
t.integer "currency_id"
|
196
|
+
t.datetime "created_at", :null => false
|
197
|
+
t.datetime "updated_at", :null => false
|
198
|
+
end
|
199
|
+
|
200
|
+
add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
|
201
|
+
|
202
|
+
create_table "note_types", :force => true do |t|
|
203
|
+
t.integer "parent_id"
|
204
|
+
t.integer "lft"
|
205
|
+
t.integer "rgt"
|
206
|
+
t.string "description"
|
207
|
+
t.string "internal_identifier"
|
208
|
+
t.string "external_identifier"
|
209
|
+
t.integer "note_type_record_id"
|
210
|
+
t.string "note_type_record_type"
|
211
|
+
t.datetime "created_at", :null => false
|
212
|
+
t.datetime "updated_at", :null => false
|
213
|
+
end
|
214
|
+
|
215
|
+
add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
|
216
|
+
|
217
|
+
create_table "notes", :force => true do |t|
|
218
|
+
t.integer "created_by_id"
|
219
|
+
t.text "content"
|
220
|
+
t.integer "noted_record_id"
|
221
|
+
t.string "noted_record_type"
|
222
|
+
t.integer "note_type_id"
|
223
|
+
t.datetime "created_at", :null => false
|
224
|
+
t.datetime "updated_at", :null => false
|
225
|
+
end
|
226
|
+
|
227
|
+
add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
|
228
|
+
add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
|
229
|
+
add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
|
230
|
+
|
231
|
+
create_table "organizations", :force => true do |t|
|
232
|
+
t.string "description"
|
233
|
+
t.string "tax_id_number"
|
234
|
+
t.datetime "created_at", :null => false
|
235
|
+
t.datetime "updated_at", :null => false
|
236
|
+
end
|
237
|
+
|
238
|
+
create_table "parties", :force => true do |t|
|
239
|
+
t.string "description"
|
240
|
+
t.integer "business_party_id"
|
241
|
+
t.string "business_party_type"
|
242
|
+
t.integer "list_view_image_id"
|
243
|
+
t.string "enterprise_identifier"
|
244
|
+
t.datetime "created_at", :null => false
|
245
|
+
t.datetime "updated_at", :null => false
|
246
|
+
end
|
247
|
+
|
248
|
+
add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
|
249
|
+
|
250
|
+
create_table "party_relationships", :force => true do |t|
|
251
|
+
t.string "description"
|
252
|
+
t.integer "party_id_from"
|
253
|
+
t.integer "party_id_to"
|
254
|
+
t.integer "role_type_id_from"
|
255
|
+
t.integer "role_type_id_to"
|
256
|
+
t.integer "status_type_id"
|
257
|
+
t.integer "priority_type_id"
|
258
|
+
t.integer "relationship_type_id"
|
259
|
+
t.date "from_date"
|
260
|
+
t.date "thru_date"
|
261
|
+
t.string "external_identifier"
|
262
|
+
t.string "external_id_source"
|
263
|
+
t.datetime "created_at", :null => false
|
264
|
+
t.datetime "updated_at", :null => false
|
265
|
+
end
|
266
|
+
|
267
|
+
add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
|
268
|
+
add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
|
269
|
+
add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
|
270
|
+
|
271
|
+
create_table "party_roles", :force => true do |t|
|
272
|
+
t.string "type"
|
273
|
+
t.integer "party_id"
|
274
|
+
t.integer "role_type_id"
|
275
|
+
t.datetime "created_at", :null => false
|
276
|
+
t.datetime "updated_at", :null => false
|
277
|
+
end
|
278
|
+
|
279
|
+
add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
|
280
|
+
add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
|
281
|
+
|
282
|
+
create_table "party_search_facts", :force => true do |t|
|
283
|
+
t.integer "party_id"
|
284
|
+
t.string "eid"
|
285
|
+
t.string "type"
|
286
|
+
t.text "roles"
|
287
|
+
t.string "party_description"
|
288
|
+
t.string "party_business_party_type"
|
289
|
+
t.string "user_login"
|
290
|
+
t.string "individual_current_last_name"
|
291
|
+
t.string "individual_current_first_name"
|
292
|
+
t.string "individual_current_middle_name"
|
293
|
+
t.string "individual_birth_date"
|
294
|
+
t.string "individual_ssn"
|
295
|
+
t.string "party_phone_number"
|
296
|
+
t.string "party_email_address"
|
297
|
+
t.string "party_address_1"
|
298
|
+
t.string "party_address_2"
|
299
|
+
t.string "party_primary_address_city"
|
300
|
+
t.string "party_primary_address_state"
|
301
|
+
t.string "party_primary_address_zip"
|
302
|
+
t.string "party_primary_address_country"
|
303
|
+
t.boolean "user_enabled"
|
304
|
+
t.string "user_type"
|
305
|
+
t.boolean "reindex"
|
306
|
+
t.datetime "created_at", :null => false
|
307
|
+
t.datetime "updated_at", :null => false
|
308
|
+
end
|
309
|
+
|
310
|
+
create_table "phone_numbers", :force => true do |t|
|
311
|
+
t.string "phone_number"
|
312
|
+
t.string "description"
|
313
|
+
t.datetime "created_at", :null => false
|
314
|
+
t.datetime "updated_at", :null => false
|
315
|
+
end
|
316
|
+
|
317
|
+
create_table "postal_addresses", :force => true do |t|
|
318
|
+
t.string "address_line_1"
|
319
|
+
t.string "address_line_2"
|
320
|
+
t.string "city"
|
321
|
+
t.string "state"
|
322
|
+
t.string "zip"
|
323
|
+
t.string "country"
|
324
|
+
t.string "description"
|
325
|
+
t.integer "geo_country_id"
|
326
|
+
t.integer "geo_zone_id"
|
327
|
+
t.datetime "created_at", :null => false
|
328
|
+
t.datetime "updated_at", :null => false
|
329
|
+
end
|
330
|
+
|
331
|
+
add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
|
332
|
+
add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
|
333
|
+
|
334
|
+
create_table "relationship_types", :force => true do |t|
|
335
|
+
t.integer "parent_id"
|
336
|
+
t.integer "lft"
|
337
|
+
t.integer "rgt"
|
338
|
+
t.integer "valid_from_role_type_id"
|
339
|
+
t.integer "valid_to_role_type_id"
|
340
|
+
t.string "name"
|
341
|
+
t.string "description"
|
342
|
+
t.string "internal_identifier"
|
343
|
+
t.string "external_identifier"
|
344
|
+
t.string "external_id_source"
|
345
|
+
t.datetime "created_at", :null => false
|
346
|
+
t.datetime "updated_at", :null => false
|
347
|
+
end
|
348
|
+
|
349
|
+
add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
|
350
|
+
add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
|
351
|
+
|
352
|
+
create_table "role_types", :force => true do |t|
|
353
|
+
t.integer "parent_id"
|
354
|
+
t.integer "lft"
|
355
|
+
t.integer "rgt"
|
356
|
+
t.string "description"
|
357
|
+
t.string "comments"
|
358
|
+
t.string "internal_identifier"
|
359
|
+
t.string "external_identifier"
|
360
|
+
t.string "external_id_source"
|
361
|
+
t.datetime "created_at", :null => false
|
362
|
+
t.datetime "updated_at", :null => false
|
363
|
+
end
|
364
|
+
|
365
|
+
create_table "valid_note_types", :force => true do |t|
|
366
|
+
t.integer "valid_note_type_record_id"
|
367
|
+
t.string "valid_note_type_record_type"
|
368
|
+
t.integer "note_type_id"
|
369
|
+
t.datetime "created_at", :null => false
|
370
|
+
t.datetime "updated_at", :null => false
|
371
|
+
end
|
372
|
+
|
373
|
+
add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
|
374
|
+
add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
|
375
|
+
|
376
|
+
create_table "view_types", :force => true do |t|
|
377
|
+
t.string "internal_identifier"
|
378
|
+
t.string "description"
|
379
|
+
t.datetime "created_at", :null => false
|
380
|
+
t.datetime "updated_at", :null => false
|
381
|
+
end
|
382
|
+
|
383
|
+
end
|
Binary file
|