erp_forms 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/erp_forms/version.rb +1 -1
- metadata +9 -93
- data/spec/dummy/db/data_migrations/20110109173616_create_capability_scope_types.erp_tech_svcs.rb +0 -15
- data/spec/dummy/db/data_migrations/20110525001935_add_usd_currency.erp_base_erp_svcs.rb +0 -12
- data/spec/dummy/db/data_migrations/20110608185830_create_default_dynamic_models_and_forms.erp_forms.rb +0 -33
- data/spec/dummy/db/data_migrations/20110609150135_add_iso_codes.erp_base_erp_svcs.rb +0 -19
- data/spec/dummy/db/data_migrations/20110728201729_erp_app_setup.erp_app.rb +0 -252
- data/spec/dummy/db/data_migrations/20110728201733_update_preferences.erp_app.rb +0 -53
- data/spec/dummy/db/data_migrations/20110802200222_schedule_delete_expired_sessions_job.erp_tech_svcs.rb +0 -16
- data/spec/dummy/db/data_migrations/20110816161238_create_desktop_app_audit_log_viewer.erp_app.rb +0 -21
- data/spec/dummy/db/data_migrations/20110817160743_add_file_manager_application.erp_app.rb +0 -32
- data/spec/dummy/db/data_migrations/20110828190913_create_desktop_app_dynamic_forms.erp_forms.rb +0 -19
- data/spec/dummy/db/data_migrations/20110913145838_setup_compass_ae_instance.erp_base_erp_svcs.rb +0 -12
- data/spec/dummy/db/data_migrations/20111108183739_add_default_capabilities.erp_app.rb +0 -23
- data/spec/dummy/db/data_migrations/20111108183740_add_new_contact_widgets.erp_app.rb +0 -42
- data/spec/dummy/db/data_migrations/20111111144706_setup_audit_log_types.erp_tech_svcs.rb +0 -22
- data/spec/dummy/db/data_migrations/20120229160222_add_userinfo_widget.erp_app.rb +0 -29
- data/spec/dummy/db/data_migrations/20120405193721_create_party_and_role_type_for_communication_events.erp_app.rb +0 -11
- data/spec/dummy/db/data_migrations/20120411180756_create_user_management_mobile_application.erp_app.rb +0 -19
- data/spec/dummy/db/data_migrations/20120418164215_create_configuration_management_desktop_application.erp_app.rb +0 -23
- data/spec/dummy/db/data_migrations/20120824013449_create_ticket_form.erp_forms.rb +0 -67
- data/spec/dummy/db/data_migrations/20121026013449_update_ticket_form.erp_forms.rb +0 -65
- data/spec/dummy/db/data_migrations/20121026191738_update_contact_form.erp_forms.rb +0 -27
- data/spec/dummy/db/data_migrations/20121116155018_create_group_relationship_and_role_types.erp_tech_svcs.rb +0 -20
- data/spec/dummy/db/data_migrations/20121130201859_upgrade_remove_system_mgmt_app.erp_app.rb +0 -16
- data/spec/dummy/db/data_migrations/20121130212146_note_capabilities.erp_tech_svcs.rb +0 -24
- data/spec/dummy/db/data_migrations/20121218175028_create_security_management_desktop_application.erp_app.rb +0 -23
- data/spec/dummy/db/migrate/20130105143900_base_erp_services.erp_base_erp_svcs.rb +0 -461
- data/spec/dummy/db/migrate/20130105143901_base_tech_services.erp_tech_svcs.rb +0 -271
- data/spec/dummy/db/migrate/20130105143902_create_has_attribute_tables.erp_tech_svcs.rb +0 -39
- data/spec/dummy/db/migrate/20130105143903_create_groups.erp_tech_svcs.rb +0 -19
- data/spec/dummy/db/migrate/20130105143904_upgrade_security.erp_tech_svcs.rb +0 -54
- data/spec/dummy/db/migrate/20130105143905_upgrade_security2.erp_tech_svcs.rb +0 -270
- data/spec/dummy/db/migrate/20130105143906_base_app_framework.erp_app.rb +0 -276
- data/spec/dummy/db/migrate/20130105143907_dynamic_forms.erp_forms.rb +0 -95
- data/spec/dummy/db/migrate/20130105143908_create_tickets.erp_forms.rb +0 -19
- data/spec/dummy/db/migrate/20130105143909_upgrade_dynamic_forms_table.erp_forms.rb +0 -32
- data/spec/dummy/db/schema.rb +0 -894
- data/spec/dummy/db/spec.sqlite3 +0 -0
@@ -1,276 +0,0 @@
|
|
1
|
-
# This migration comes from erp_app (originally 20080805000096)
|
2
|
-
class BaseAppFramework < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
|
5
|
-
unless table_exists?(:preferences)
|
6
|
-
create_table :preferences do |t|
|
7
|
-
t.references :preference_option
|
8
|
-
t.references :preference_type
|
9
|
-
|
10
|
-
t.timestamps
|
11
|
-
end
|
12
|
-
add_index :preferences, :preference_option_id
|
13
|
-
add_index :preferences, :preference_type_id
|
14
|
-
end
|
15
|
-
|
16
|
-
unless table_exists?(:preference_types)
|
17
|
-
create_table :preference_types do |t|
|
18
|
-
t.string :description
|
19
|
-
t.string :internal_identifier
|
20
|
-
t.integer :default_pref_option_id
|
21
|
-
|
22
|
-
t.timestamps
|
23
|
-
end
|
24
|
-
|
25
|
-
add_index :preference_types, :default_pref_option_id
|
26
|
-
end
|
27
|
-
|
28
|
-
unless table_exists?(:preference_options)
|
29
|
-
create_table :preference_options do |t|
|
30
|
-
t.string :description
|
31
|
-
t.string :internal_identifier
|
32
|
-
t.string :value
|
33
|
-
|
34
|
-
t.timestamps
|
35
|
-
end
|
36
|
-
end
|
37
|
-
|
38
|
-
unless table_exists?(:preference_options_preference_types)
|
39
|
-
create_table :preference_options_preference_types, {:id => false} do |t|
|
40
|
-
t.references :preference_type
|
41
|
-
t.references :preference_option
|
42
|
-
end
|
43
|
-
|
44
|
-
add_index :preference_options_preference_types, :preference_type_id, :name => 'pref_opt_pref_type_pref_type_id_idx'
|
45
|
-
add_index :preference_options_preference_types, :preference_option_id, :name => 'pref_opt_pref_type_pref_opt_id_idx'
|
46
|
-
end
|
47
|
-
|
48
|
-
unless table_exists?(:valid_preference_types)
|
49
|
-
create_table :valid_preference_types do |t|
|
50
|
-
t.references :preference_type
|
51
|
-
t.references :preferenced_record, :polymorphic => true
|
52
|
-
end
|
53
|
-
end
|
54
|
-
|
55
|
-
unless table_exists?(:user_preferences)
|
56
|
-
create_table :user_preferences do |t|
|
57
|
-
t.references :user
|
58
|
-
t.references :preference
|
59
|
-
|
60
|
-
t.references :preferenced_record, :polymorphic => true
|
61
|
-
|
62
|
-
t.timestamps
|
63
|
-
end
|
64
|
-
add_index :user_preferences, :user_id
|
65
|
-
add_index :user_preferences, :preference_id
|
66
|
-
add_index :user_preferences, :preferenced_record_id
|
67
|
-
add_index :user_preferences, :preferenced_record_type
|
68
|
-
end
|
69
|
-
|
70
|
-
unless table_exists?(:app_containers)
|
71
|
-
create_table :app_containers do |t|
|
72
|
-
t.references :user
|
73
|
-
t.string :description
|
74
|
-
t.string :internal_identifier
|
75
|
-
t.string :type
|
76
|
-
|
77
|
-
t.timestamps
|
78
|
-
end
|
79
|
-
add_index :app_containers, :user_id
|
80
|
-
add_index :app_containers, :type
|
81
|
-
end
|
82
|
-
|
83
|
-
unless table_exists?(:applications)
|
84
|
-
create_table :applications do |t|
|
85
|
-
t.column :description, :string
|
86
|
-
t.column :icon, :string
|
87
|
-
t.column :internal_identifier, :string
|
88
|
-
t.column :javascript_class_name, :string
|
89
|
-
t.column :shortcut_id, :string
|
90
|
-
t.column :base_url, :string
|
91
|
-
t.column :type, :string
|
92
|
-
|
93
|
-
t.timestamps
|
94
|
-
end
|
95
|
-
end
|
96
|
-
|
97
|
-
unless table_exists?(:app_containers_applications)
|
98
|
-
create_table :app_containers_applications, {:id => false} do |t|
|
99
|
-
t.column :app_container_id, :integer
|
100
|
-
t.column :application_id, :integer
|
101
|
-
end
|
102
|
-
|
103
|
-
add_index :app_containers_applications, :application_id
|
104
|
-
add_index :app_containers_applications, :app_container_id
|
105
|
-
end
|
106
|
-
|
107
|
-
unless table_exists?(:widgets)
|
108
|
-
create_table :widgets do |t|
|
109
|
-
t.column :description, :string
|
110
|
-
t.column :internal_identifier, :string
|
111
|
-
t.column :icon, :string
|
112
|
-
t.column :xtype, :string
|
113
|
-
|
114
|
-
t.timestamps
|
115
|
-
end
|
116
|
-
end
|
117
|
-
|
118
|
-
unless table_exists?(:applications_widgets)
|
119
|
-
create_table :applications_widgets, {:id => false} do |t|
|
120
|
-
t.column :application_id, :integer
|
121
|
-
t.column :widget_id, :integer
|
122
|
-
end
|
123
|
-
add_index :applications_widgets, :application_id
|
124
|
-
add_index :applications_widgets, :widget_id
|
125
|
-
end
|
126
|
-
|
127
|
-
unless table_exists?(:tree_menu_node_defs)
|
128
|
-
create_table :tree_menu_node_defs do |t|
|
129
|
-
t.string :node_type
|
130
|
-
t.integer :parent_id
|
131
|
-
t.integer :lft
|
132
|
-
t.integer :rgt
|
133
|
-
t.string :menu_short_name
|
134
|
-
t.string :menu_description
|
135
|
-
t.string :text
|
136
|
-
t.string :icon_url
|
137
|
-
t.string :target_url
|
138
|
-
t.string :resource_class
|
139
|
-
t.timestamps
|
140
|
-
end
|
141
|
-
add_index :tree_menu_node_defs, :parent_id
|
142
|
-
end
|
143
|
-
|
144
|
-
unless table_exists? :configurations
|
145
|
-
create_table :configurations do |t|
|
146
|
-
#custom columns go here
|
147
|
-
t.string :description
|
148
|
-
t.string :internal_identifier
|
149
|
-
t.boolean :active
|
150
|
-
t.boolean :is_template, :default => false
|
151
|
-
|
152
|
-
t.timestamps
|
153
|
-
end
|
154
|
-
|
155
|
-
add_index :configurations, :is_template
|
156
|
-
end
|
157
|
-
|
158
|
-
unless table_exists? :valid_configurations
|
159
|
-
create_table :valid_configurations do |t|
|
160
|
-
#foreign keys
|
161
|
-
t.references :configured_item, :polymorphic => true
|
162
|
-
t.references :configuration
|
163
|
-
|
164
|
-
t.timestamps
|
165
|
-
end
|
166
|
-
|
167
|
-
add_index :valid_configurations, [:configured_item_id, :configured_item_type], :name => 'configured_item_poly_idx'
|
168
|
-
add_index :valid_configurations, :configuration_id
|
169
|
-
end
|
170
|
-
|
171
|
-
unless table_exists? :configuration_items
|
172
|
-
create_table :configuration_items do |t|
|
173
|
-
#foreign keys
|
174
|
-
t.references :configuration
|
175
|
-
t.references :configuration_item_type
|
176
|
-
t.references :configuration_option
|
177
|
-
|
178
|
-
t.timestamps
|
179
|
-
end
|
180
|
-
|
181
|
-
add_index :configuration_items, :configuration_id
|
182
|
-
add_index :configuration_items, :configuration_item_type_id
|
183
|
-
add_index :configuration_items, :configuration_option_id
|
184
|
-
end
|
185
|
-
|
186
|
-
unless table_exists? :configuration_item_types
|
187
|
-
create_table :configuration_item_types do |t|
|
188
|
-
#awesome nested set columns
|
189
|
-
t.integer :parent_id
|
190
|
-
t.integer :lft
|
191
|
-
t.integer :rgt
|
192
|
-
|
193
|
-
#custom columns go here
|
194
|
-
t.string :description
|
195
|
-
t.string :internal_identifier
|
196
|
-
t.boolean :allow_user_defined_options, :default => false
|
197
|
-
t.boolean :is_multi_optional, :default => false
|
198
|
-
|
199
|
-
t.timestamps
|
200
|
-
end
|
201
|
-
end
|
202
|
-
|
203
|
-
unless table_exists?(:configuration_item_types_configurations)
|
204
|
-
create_table :configuration_item_types_configurations, {:id => false} do |t|
|
205
|
-
t.references :configuration_item_type
|
206
|
-
t.references :configuration
|
207
|
-
end
|
208
|
-
|
209
|
-
add_index :configuration_item_types_configurations, :configuration_item_type_id, :name => 'conf_conf_type_id_item_idx'
|
210
|
-
add_index :configuration_item_types_configurations, :configuration_id, :name => 'conf_id_idx'
|
211
|
-
add_index :configuration_item_types_configurations, [:configuration_item_type_id, :configuration_id], :unique => true, :name => 'conf_config_type_uniq_idx'
|
212
|
-
end
|
213
|
-
|
214
|
-
unless table_exists? :configuration_options
|
215
|
-
create_table :configuration_options do |t|
|
216
|
-
#custom columns go here
|
217
|
-
t.string :description
|
218
|
-
t.string :internal_identifier
|
219
|
-
t.string :value
|
220
|
-
t.text :comment
|
221
|
-
t.boolean :user_defined, :default => false
|
222
|
-
|
223
|
-
t.timestamps
|
224
|
-
end
|
225
|
-
|
226
|
-
add_index :configuration_options, :value
|
227
|
-
add_index :configuration_options, :internal_identifier
|
228
|
-
add_index :configuration_options, :user_defined
|
229
|
-
end
|
230
|
-
|
231
|
-
unless table_exists?(:configuration_item_types_configuration_options)
|
232
|
-
create_table :configuration_item_types_configuration_options do |t|
|
233
|
-
t.references :configuration_item_type
|
234
|
-
t.references :configuration_option
|
235
|
-
t.boolean :is_default, :default => false
|
236
|
-
|
237
|
-
t.timestamps
|
238
|
-
end
|
239
|
-
|
240
|
-
add_index :configuration_item_types_configuration_options, :configuration_item_type_id, :name => 'conf_item_type_conf_opt_id_item_idx'
|
241
|
-
add_index :configuration_item_types_configuration_options, :configuration_option_id, :name => 'conf_item_type_conf_opt_id_opt_idx'
|
242
|
-
end
|
243
|
-
|
244
|
-
unless table_exists?(:configuration_items_configuration_options)
|
245
|
-
create_table :configuration_items_configuration_options, {:id => false} do |t|
|
246
|
-
t.references :configuration_item
|
247
|
-
t.references :configuration_option
|
248
|
-
end
|
249
|
-
|
250
|
-
add_index :configuration_items_configuration_options, :configuration_item_id, :name => 'conf_item_conf_opt_id_item_idx'
|
251
|
-
add_index :configuration_items_configuration_options, :configuration_option_id, :name => 'conf_item_conf_opt_id_opt_idx'
|
252
|
-
end
|
253
|
-
|
254
|
-
end
|
255
|
-
|
256
|
-
def self.down
|
257
|
-
[
|
258
|
-
:preferences, :preference_types,
|
259
|
-
:preference_options, :preference_options_preference_types,
|
260
|
-
:valid_preference_types, :user_preferences,
|
261
|
-
:app_containers, :app_containers_applications,
|
262
|
-
:applications_widgets, :widgets, :tree_menu_node_defs,
|
263
|
-
:applications, :applications_desktops,
|
264
|
-
:configurations, :configuration_items,
|
265
|
-
:configuration_item_types, :configuration_options,
|
266
|
-
:configuration_item_types_configuration_options,
|
267
|
-
:configuration_items_configuration_options, :configured_items,
|
268
|
-
:configuration_item_types_configurations
|
269
|
-
].each do |tbl|
|
270
|
-
if table_exists?(tbl)
|
271
|
-
drop_table(tbl)
|
272
|
-
end
|
273
|
-
end
|
274
|
-
end
|
275
|
-
|
276
|
-
end
|
@@ -1,95 +0,0 @@
|
|
1
|
-
# This migration comes from erp_forms (originally 20110530193446)
|
2
|
-
class DynamicForms < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
unless table_exists?(:dynamic_form_models)
|
5
|
-
create_table :dynamic_form_models do |t|
|
6
|
-
t.string :model_name
|
7
|
-
t.boolean :show_in_multitask, :default => false
|
8
|
-
t.boolean :allow_comments, :default => true
|
9
|
-
t.boolean :allow_files, :default => true
|
10
|
-
t.string :file_security_default, :default => 'private'
|
11
|
-
|
12
|
-
t.timestamps
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
unless table_exists?(:dynamic_form_documents)
|
17
|
-
create_table :dynamic_form_documents do |t|
|
18
|
-
t.integer :dynamic_form_model_id
|
19
|
-
t.string :type
|
20
|
-
|
21
|
-
t.timestamps
|
22
|
-
end
|
23
|
-
|
24
|
-
add_index :dynamic_form_documents, :dynamic_form_model_id
|
25
|
-
add_index :dynamic_form_documents, :type
|
26
|
-
end
|
27
|
-
|
28
|
-
unless table_exists?(:dynamic_forms)
|
29
|
-
create_table :dynamic_forms do |t|
|
30
|
-
t.string :description
|
31
|
-
t.text :definition
|
32
|
-
t.integer :dynamic_form_model_id
|
33
|
-
t.string :model_name
|
34
|
-
t.string :internal_identifier
|
35
|
-
t.boolean :default
|
36
|
-
t.string :widget_action, :default => 'save'
|
37
|
-
t.string :widget_email_recipients
|
38
|
-
t.boolean :focus_first_field, :default => true
|
39
|
-
t.boolean :submit_empty_text, :default => false
|
40
|
-
t.string :msg_target, :default => 'qtip'
|
41
|
-
t.string :submit_button_label, :default => 'Submit'
|
42
|
-
t.string :cancel_button_label, :default => 'Cancel'
|
43
|
-
t.text :comment
|
44
|
-
|
45
|
-
t.integer :created_by_id
|
46
|
-
t.integer :updated_by_id
|
47
|
-
|
48
|
-
t.timestamps
|
49
|
-
end
|
50
|
-
|
51
|
-
add_index :dynamic_forms, :created_by_id
|
52
|
-
add_index :dynamic_forms, :updated_by_id
|
53
|
-
add_index :dynamic_forms, :dynamic_form_model_id
|
54
|
-
add_index :dynamic_forms, :model_name
|
55
|
-
add_index :dynamic_forms, :internal_identifier
|
56
|
-
end
|
57
|
-
|
58
|
-
unless table_exists?(:dynamic_data)
|
59
|
-
create_table :dynamic_data do |t|
|
60
|
-
t.string :reference_type
|
61
|
-
t.integer :reference_id
|
62
|
-
t.text :dynamic_attributes
|
63
|
-
|
64
|
-
t.integer :created_with_form_id
|
65
|
-
t.integer :updated_with_form_id
|
66
|
-
|
67
|
-
t.integer :created_by_id
|
68
|
-
t.integer :updated_by_id
|
69
|
-
|
70
|
-
t.timestamps
|
71
|
-
end
|
72
|
-
|
73
|
-
add_index :dynamic_data, :created_with_form_id
|
74
|
-
add_index :dynamic_data, :updated_with_form_id
|
75
|
-
add_index :dynamic_data, :created_by_id
|
76
|
-
add_index :dynamic_data, :updated_by_id
|
77
|
-
add_index :dynamic_data, :reference_type
|
78
|
-
add_index :dynamic_data, :reference_id
|
79
|
-
end
|
80
|
-
|
81
|
-
end
|
82
|
-
|
83
|
-
def self.down
|
84
|
-
[ :dynamic_form_models,
|
85
|
-
:dynamic_form_documents,
|
86
|
-
:dynamic_forms,
|
87
|
-
:dynamic_data
|
88
|
-
].each do |tbl|
|
89
|
-
if table_exists?(tbl)
|
90
|
-
drop_table tbl
|
91
|
-
end
|
92
|
-
end
|
93
|
-
|
94
|
-
end
|
95
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# This migration comes from erp_forms (originally 20120824012520)
|
2
|
-
class CreateTickets < ActiveRecord::Migration
|
3
|
-
|
4
|
-
def up
|
5
|
-
unless table_exists?(:tickets)
|
6
|
-
create_table :tickets do |t|
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
end
|
10
|
-
|
11
|
-
end
|
12
|
-
|
13
|
-
def down
|
14
|
-
if table_exists?(:tickets)
|
15
|
-
drop_table :tickets
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|
@@ -1,32 +0,0 @@
|
|
1
|
-
# This migration comes from erp_forms (originally 20121007022323)
|
2
|
-
class UpgradeDynamicFormsTable < ActiveRecord::Migration
|
3
|
-
def self.up
|
4
|
-
add_column :dynamic_form_models, :show_in_multitask, :boolean, :default => false unless columns(:dynamic_form_models).collect {|c| c.name}.include?('show_in_multitask')
|
5
|
-
add_column :dynamic_form_models, :allow_comments, :boolean, :default => true unless columns(:dynamic_form_models).collect {|c| c.name}.include?('allow_comments')
|
6
|
-
add_column :dynamic_form_models, :allow_files, :boolean, :default => true unless columns(:dynamic_form_models).collect {|c| c.name}.include?('allow_files')
|
7
|
-
add_column :dynamic_form_models, :file_security_default, :string, :default => 'private' unless columns(:dynamic_form_models).collect {|c| c.name}.include?('file_security_default')
|
8
|
-
add_column :dynamic_forms, :widget_action, :string, :default => 'save' unless columns(:dynamic_forms).collect {|c| c.name}.include?('widget_action')
|
9
|
-
add_column :dynamic_forms, :widget_email_recipients, :string unless columns(:dynamic_forms).collect {|c| c.name}.include?('widget_email_recipients')
|
10
|
-
add_column :dynamic_forms, :focus_first_field, :boolean, :default => true unless columns(:dynamic_forms).collect {|c| c.name}.include?('focus_first_field')
|
11
|
-
add_column :dynamic_forms, :submit_empty_text, :boolean, :default => false unless columns(:dynamic_forms).collect {|c| c.name}.include?('submit_empty_text')
|
12
|
-
add_column :dynamic_forms, :msg_target, :string, :default => 'qtip' unless columns(:dynamic_forms).collect {|c| c.name}.include?('msg_target')
|
13
|
-
add_column :dynamic_forms, :submit_button_label, :string, :default => 'Submit' unless columns(:dynamic_forms).collect {|c| c.name}.include?('submit_button_label')
|
14
|
-
add_column :dynamic_forms, :cancel_button_label, :string, :default => 'Cancel' unless columns(:dynamic_forms).collect {|c| c.name}.include?('cancel_button_label')
|
15
|
-
add_column :dynamic_forms, :comment, :text unless columns(:dynamic_forms).collect {|c| c.name}.include?('comment')
|
16
|
-
end
|
17
|
-
|
18
|
-
def self.down
|
19
|
-
remove_column :dynamic_form_models, :show_in_multitask if columns(:dynamic_form_models).collect {|c| c.name}.include?('show_in_multitask')
|
20
|
-
remove_column :dynamic_form_models, :file_security_default if columns(:dynamic_form_models).collect {|c| c.name}.include?('file_security_default')
|
21
|
-
remove_column :dynamic_form_models, :allow_files if columns(:dynamic_form_models).collect {|c| c.name}.include?('allow_files')
|
22
|
-
remove_column :dynamic_form_models, :allow_comments if columns(:dynamic_form_models).collect {|c| c.name}.include?('allow_comments')
|
23
|
-
remove_column :dynamic_forms, :widget_action if columns(:dynamic_forms).collect {|c| c.name}.include?('widget_action')
|
24
|
-
remove_column :dynamic_forms, :widget_email_recipients if columns(:dynamic_forms).collect {|c| c.name}.include?('widget_email_recipients')
|
25
|
-
remove_column :dynamic_forms, :focus_first_field if columns(:dynamic_forms).collect {|c| c.name}.include?('focus_first_field')
|
26
|
-
remove_column :dynamic_forms, :submit_empty_text if columns(:dynamic_forms).collect {|c| c.name}.include?('submit_empty_text')
|
27
|
-
remove_column :dynamic_forms, :msg_target if columns(:dynamic_forms).collect {|c| c.name}.include?('msg_target')
|
28
|
-
remove_column :dynamic_forms, :submit_button_label if columns(:dynamic_forms).collect {|c| c.name}.include?('submit_button_label')
|
29
|
-
remove_column :dynamic_forms, :cancel_button_label if columns(:dynamic_forms).collect {|c| c.name}.include?('cancel_button_label')
|
30
|
-
remove_column :dynamic_forms, :comment if columns(:dynamic_forms).collect {|c| c.name}.include?('comment')
|
31
|
-
end
|
32
|
-
end
|
data/spec/dummy/db/schema.rb
DELETED
@@ -1,894 +0,0 @@
|
|
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 => 20130105143909) do
|
15
|
-
|
16
|
-
create_table "app_containers", :force => true do |t|
|
17
|
-
t.integer "user_id"
|
18
|
-
t.string "description"
|
19
|
-
t.string "internal_identifier"
|
20
|
-
t.string "type"
|
21
|
-
t.datetime "created_at", :null => false
|
22
|
-
t.datetime "updated_at", :null => false
|
23
|
-
end
|
24
|
-
|
25
|
-
add_index "app_containers", ["type"], :name => "index_app_containers_on_type"
|
26
|
-
add_index "app_containers", ["user_id"], :name => "index_app_containers_on_user_id"
|
27
|
-
|
28
|
-
create_table "app_containers_applications", :id => false, :force => true do |t|
|
29
|
-
t.integer "app_container_id"
|
30
|
-
t.integer "application_id"
|
31
|
-
end
|
32
|
-
|
33
|
-
add_index "app_containers_applications", ["app_container_id"], :name => "index_app_containers_applications_on_app_container_id"
|
34
|
-
add_index "app_containers_applications", ["application_id"], :name => "index_app_containers_applications_on_application_id"
|
35
|
-
|
36
|
-
create_table "applications", :force => true do |t|
|
37
|
-
t.string "description"
|
38
|
-
t.string "icon"
|
39
|
-
t.string "internal_identifier"
|
40
|
-
t.string "javascript_class_name"
|
41
|
-
t.string "shortcut_id"
|
42
|
-
t.string "base_url"
|
43
|
-
t.string "type"
|
44
|
-
t.datetime "created_at", :null => false
|
45
|
-
t.datetime "updated_at", :null => false
|
46
|
-
end
|
47
|
-
|
48
|
-
create_table "applications_widgets", :id => false, :force => true do |t|
|
49
|
-
t.integer "application_id"
|
50
|
-
t.integer "widget_id"
|
51
|
-
end
|
52
|
-
|
53
|
-
add_index "applications_widgets", ["application_id"], :name => "index_applications_widgets_on_application_id"
|
54
|
-
add_index "applications_widgets", ["widget_id"], :name => "index_applications_widgets_on_widget_id"
|
55
|
-
|
56
|
-
create_table "attribute_types", :force => true do |t|
|
57
|
-
t.string "internal_identifier"
|
58
|
-
t.string "description"
|
59
|
-
t.string "data_type"
|
60
|
-
t.datetime "created_at", :null => false
|
61
|
-
t.datetime "updated_at", :null => false
|
62
|
-
end
|
63
|
-
|
64
|
-
add_index "attribute_types", ["internal_identifier"], :name => ":attribute_types_iid_idx"
|
65
|
-
|
66
|
-
create_table "attribute_values", :force => true do |t|
|
67
|
-
t.integer "attributed_record_id"
|
68
|
-
t.string "attributed_record_type"
|
69
|
-
t.integer "attribute_type_id"
|
70
|
-
t.string "value"
|
71
|
-
t.datetime "created_at", :null => false
|
72
|
-
t.datetime "updated_at", :null => false
|
73
|
-
end
|
74
|
-
|
75
|
-
add_index "attribute_values", ["attribute_type_id"], :name => "attribute_values_attributed_type_idx"
|
76
|
-
add_index "attribute_values", ["attributed_record_id", "attributed_record_type"], :name => "attribute_values_attributed_record_idx"
|
77
|
-
add_index "attribute_values", ["value"], :name => "attribute_values_value_idx"
|
78
|
-
|
79
|
-
create_table "audit_log_item_types", :force => true do |t|
|
80
|
-
t.string "internal_identifier"
|
81
|
-
t.string "external_identifier"
|
82
|
-
t.string "external_id_source"
|
83
|
-
t.string "description"
|
84
|
-
t.string "comments"
|
85
|
-
t.integer "parent_id"
|
86
|
-
t.integer "lft"
|
87
|
-
t.integer "rgt"
|
88
|
-
t.datetime "created_at", :null => false
|
89
|
-
t.datetime "updated_at", :null => false
|
90
|
-
end
|
91
|
-
|
92
|
-
create_table "audit_log_items", :force => true do |t|
|
93
|
-
t.integer "audit_log_id"
|
94
|
-
t.integer "audit_log_item_type_id"
|
95
|
-
t.string "audit_log_item_value"
|
96
|
-
t.string "description"
|
97
|
-
t.datetime "created_at", :null => false
|
98
|
-
t.datetime "updated_at", :null => false
|
99
|
-
end
|
100
|
-
|
101
|
-
create_table "audit_log_types", :force => true do |t|
|
102
|
-
t.string "description"
|
103
|
-
t.string "error_code"
|
104
|
-
t.string "comments"
|
105
|
-
t.string "internal_identifier"
|
106
|
-
t.string "external_identifier"
|
107
|
-
t.string "external_id_source"
|
108
|
-
t.integer "parent_id"
|
109
|
-
t.integer "lft"
|
110
|
-
t.integer "rgt"
|
111
|
-
t.datetime "created_at", :null => false
|
112
|
-
t.datetime "updated_at", :null => false
|
113
|
-
end
|
114
|
-
|
115
|
-
create_table "audit_logs", :force => true do |t|
|
116
|
-
t.string "application"
|
117
|
-
t.string "description"
|
118
|
-
t.integer "party_id"
|
119
|
-
t.text "additional_info"
|
120
|
-
t.integer "audit_log_type_id"
|
121
|
-
t.integer "event_record_id"
|
122
|
-
t.string "event_record_type"
|
123
|
-
t.datetime "created_at", :null => false
|
124
|
-
t.datetime "updated_at", :null => false
|
125
|
-
end
|
126
|
-
|
127
|
-
add_index "audit_logs", ["event_record_id", "event_record_type"], :name => "event_record_index"
|
128
|
-
add_index "audit_logs", ["party_id"], :name => "index_audit_logs_on_party_id"
|
129
|
-
|
130
|
-
create_table "capabilities", :force => true do |t|
|
131
|
-
t.string "description"
|
132
|
-
t.integer "capability_type_id"
|
133
|
-
t.string "capability_resource_type"
|
134
|
-
t.integer "capability_resource_id"
|
135
|
-
t.integer "scope_type_id"
|
136
|
-
t.text "scope_query"
|
137
|
-
t.datetime "created_at", :null => false
|
138
|
-
t.datetime "updated_at", :null => false
|
139
|
-
end
|
140
|
-
|
141
|
-
add_index "capabilities", ["capability_resource_id", "capability_resource_type"], :name => "capability_resource_index"
|
142
|
-
add_index "capabilities", ["capability_type_id"], :name => "index_capabilities_on_capability_type_id"
|
143
|
-
add_index "capabilities", ["scope_type_id"], :name => "index_capabilities_on_scope_type_id"
|
144
|
-
|
145
|
-
create_table "capability_accessors", :force => true do |t|
|
146
|
-
t.string "capability_accessor_record_type"
|
147
|
-
t.integer "capability_accessor_record_id"
|
148
|
-
t.integer "capability_id"
|
149
|
-
t.datetime "created_at", :null => false
|
150
|
-
t.datetime "updated_at", :null => false
|
151
|
-
end
|
152
|
-
|
153
|
-
add_index "capability_accessors", ["capability_accessor_record_id", "capability_accessor_record_type"], :name => "capability_accessor_record_index"
|
154
|
-
add_index "capability_accessors", ["capability_id"], :name => "index_capability_accessors_on_capability_id"
|
155
|
-
|
156
|
-
create_table "capability_types", :force => true do |t|
|
157
|
-
t.string "internal_identifier"
|
158
|
-
t.string "description"
|
159
|
-
t.datetime "created_at", :null => false
|
160
|
-
t.datetime "updated_at", :null => false
|
161
|
-
end
|
162
|
-
|
163
|
-
create_table "capable_models", :force => true do |t|
|
164
|
-
t.integer "capable_model_record_id"
|
165
|
-
t.string "capable_model_record_type"
|
166
|
-
t.datetime "created_at", :null => false
|
167
|
-
t.datetime "updated_at", :null => false
|
168
|
-
end
|
169
|
-
|
170
|
-
add_index "capable_models", ["capable_model_record_id", "capable_model_record_type"], :name => "capable_model_record_idx"
|
171
|
-
|
172
|
-
create_table "categories", :force => true do |t|
|
173
|
-
t.string "description"
|
174
|
-
t.string "external_identifier"
|
175
|
-
t.datetime "from_date"
|
176
|
-
t.datetime "to_date"
|
177
|
-
t.string "internal_identifier"
|
178
|
-
t.integer "category_record_id"
|
179
|
-
t.string "category_record_type"
|
180
|
-
t.integer "parent_id"
|
181
|
-
t.integer "lft"
|
182
|
-
t.integer "rgt"
|
183
|
-
t.datetime "created_at", :null => false
|
184
|
-
t.datetime "updated_at", :null => false
|
185
|
-
end
|
186
|
-
|
187
|
-
add_index "categories", ["category_record_id", "category_record_type"], :name => "category_polymorphic"
|
188
|
-
|
189
|
-
create_table "category_classifications", :force => true do |t|
|
190
|
-
t.integer "category_id"
|
191
|
-
t.string "classification_type"
|
192
|
-
t.integer "classification_id"
|
193
|
-
t.datetime "from_date"
|
194
|
-
t.datetime "to_date"
|
195
|
-
t.datetime "created_at", :null => false
|
196
|
-
t.datetime "updated_at", :null => false
|
197
|
-
end
|
198
|
-
|
199
|
-
add_index "category_classifications", ["classification_id", "classification_type"], :name => "classification_polymorphic"
|
200
|
-
|
201
|
-
create_table "compass_ae_instances", :force => true do |t|
|
202
|
-
t.decimal "version", :precision => 8, :scale => 3
|
203
|
-
t.datetime "created_at", :null => false
|
204
|
-
t.datetime "updated_at", :null => false
|
205
|
-
end
|
206
|
-
|
207
|
-
create_table "configuration_item_types", :force => true do |t|
|
208
|
-
t.integer "parent_id"
|
209
|
-
t.integer "lft"
|
210
|
-
t.integer "rgt"
|
211
|
-
t.string "description"
|
212
|
-
t.string "internal_identifier"
|
213
|
-
t.boolean "allow_user_defined_options", :default => false
|
214
|
-
t.boolean "is_multi_optional", :default => false
|
215
|
-
t.datetime "created_at", :null => false
|
216
|
-
t.datetime "updated_at", :null => false
|
217
|
-
end
|
218
|
-
|
219
|
-
create_table "configuration_item_types_configuration_options", :force => true do |t|
|
220
|
-
t.integer "configuration_item_type_id"
|
221
|
-
t.integer "configuration_option_id"
|
222
|
-
t.boolean "is_default", :default => false
|
223
|
-
t.datetime "created_at", :null => false
|
224
|
-
t.datetime "updated_at", :null => false
|
225
|
-
end
|
226
|
-
|
227
|
-
add_index "configuration_item_types_configuration_options", ["configuration_item_type_id"], :name => "conf_item_type_conf_opt_id_item_idx"
|
228
|
-
add_index "configuration_item_types_configuration_options", ["configuration_option_id"], :name => "conf_item_type_conf_opt_id_opt_idx"
|
229
|
-
|
230
|
-
create_table "configuration_item_types_configurations", :id => false, :force => true do |t|
|
231
|
-
t.integer "configuration_item_type_id"
|
232
|
-
t.integer "configuration_id"
|
233
|
-
end
|
234
|
-
|
235
|
-
add_index "configuration_item_types_configurations", ["configuration_id"], :name => "conf_id_idx"
|
236
|
-
add_index "configuration_item_types_configurations", ["configuration_item_type_id", "configuration_id"], :name => "conf_config_type_uniq_idx", :unique => true
|
237
|
-
add_index "configuration_item_types_configurations", ["configuration_item_type_id"], :name => "conf_conf_type_id_item_idx"
|
238
|
-
|
239
|
-
create_table "configuration_items", :force => true do |t|
|
240
|
-
t.integer "configuration_id"
|
241
|
-
t.integer "configuration_item_type_id"
|
242
|
-
t.integer "configuration_option_id"
|
243
|
-
t.datetime "created_at", :null => false
|
244
|
-
t.datetime "updated_at", :null => false
|
245
|
-
end
|
246
|
-
|
247
|
-
add_index "configuration_items", ["configuration_id"], :name => "index_configuration_items_on_configuration_id"
|
248
|
-
add_index "configuration_items", ["configuration_item_type_id"], :name => "index_configuration_items_on_configuration_item_type_id"
|
249
|
-
add_index "configuration_items", ["configuration_option_id"], :name => "index_configuration_items_on_configuration_option_id"
|
250
|
-
|
251
|
-
create_table "configuration_items_configuration_options", :id => false, :force => true do |t|
|
252
|
-
t.integer "configuration_item_id"
|
253
|
-
t.integer "configuration_option_id"
|
254
|
-
end
|
255
|
-
|
256
|
-
add_index "configuration_items_configuration_options", ["configuration_item_id"], :name => "conf_item_conf_opt_id_item_idx"
|
257
|
-
add_index "configuration_items_configuration_options", ["configuration_option_id"], :name => "conf_item_conf_opt_id_opt_idx"
|
258
|
-
|
259
|
-
create_table "configuration_options", :force => true do |t|
|
260
|
-
t.string "description"
|
261
|
-
t.string "internal_identifier"
|
262
|
-
t.string "value"
|
263
|
-
t.text "comment"
|
264
|
-
t.boolean "user_defined", :default => false
|
265
|
-
t.datetime "created_at", :null => false
|
266
|
-
t.datetime "updated_at", :null => false
|
267
|
-
end
|
268
|
-
|
269
|
-
add_index "configuration_options", ["internal_identifier"], :name => "index_configuration_options_on_internal_identifier"
|
270
|
-
add_index "configuration_options", ["user_defined"], :name => "index_configuration_options_on_user_defined"
|
271
|
-
add_index "configuration_options", ["value"], :name => "index_configuration_options_on_value"
|
272
|
-
|
273
|
-
create_table "configurations", :force => true do |t|
|
274
|
-
t.string "description"
|
275
|
-
t.string "internal_identifier"
|
276
|
-
t.boolean "active"
|
277
|
-
t.boolean "is_template", :default => false
|
278
|
-
t.datetime "created_at", :null => false
|
279
|
-
t.datetime "updated_at", :null => false
|
280
|
-
end
|
281
|
-
|
282
|
-
add_index "configurations", ["is_template"], :name => "index_configurations_on_is_template"
|
283
|
-
|
284
|
-
create_table "contact_purposes", :force => true do |t|
|
285
|
-
t.integer "parent_id"
|
286
|
-
t.integer "lft"
|
287
|
-
t.integer "rgt"
|
288
|
-
t.string "description"
|
289
|
-
t.string "comments"
|
290
|
-
t.string "internal_identifier"
|
291
|
-
t.string "external_identifier"
|
292
|
-
t.string "external_id_source"
|
293
|
-
t.datetime "created_at", :null => false
|
294
|
-
t.datetime "updated_at", :null => false
|
295
|
-
end
|
296
|
-
|
297
|
-
add_index "contact_purposes", ["parent_id"], :name => "index_contact_purposes_on_parent_id"
|
298
|
-
|
299
|
-
create_table "contact_purposes_contacts", :id => false, :force => true do |t|
|
300
|
-
t.integer "contact_id"
|
301
|
-
t.integer "contact_purpose_id"
|
302
|
-
end
|
303
|
-
|
304
|
-
add_index "contact_purposes_contacts", ["contact_id", "contact_purpose_id"], :name => "contact_purposes_contacts_index"
|
305
|
-
|
306
|
-
create_table "contact_types", :force => true do |t|
|
307
|
-
t.integer "parent_id"
|
308
|
-
t.integer "lft"
|
309
|
-
t.integer "rgt"
|
310
|
-
t.string "description"
|
311
|
-
t.string "comments"
|
312
|
-
t.string "internal_identifier"
|
313
|
-
t.string "external_identifier"
|
314
|
-
t.string "external_id_source"
|
315
|
-
t.datetime "created_at", :null => false
|
316
|
-
t.datetime "updated_at", :null => false
|
317
|
-
end
|
318
|
-
|
319
|
-
add_index "contact_types", ["parent_id"], :name => "index_contact_types_on_parent_id"
|
320
|
-
|
321
|
-
create_table "contacts", :force => true do |t|
|
322
|
-
t.integer "party_id"
|
323
|
-
t.integer "contact_mechanism_id"
|
324
|
-
t.string "contact_mechanism_type"
|
325
|
-
t.string "external_identifier"
|
326
|
-
t.string "external_id_source"
|
327
|
-
t.datetime "created_at", :null => false
|
328
|
-
t.datetime "updated_at", :null => false
|
329
|
-
end
|
330
|
-
|
331
|
-
add_index "contacts", ["contact_mechanism_id", "contact_mechanism_type"], :name => "besi_2"
|
332
|
-
add_index "contacts", ["party_id"], :name => "index_contacts_on_party_id"
|
333
|
-
|
334
|
-
create_table "currencies", :force => true do |t|
|
335
|
-
t.string "name"
|
336
|
-
t.string "definition"
|
337
|
-
t.string "internal_identifier"
|
338
|
-
t.string "numeric_code"
|
339
|
-
t.string "major_unit_symbol"
|
340
|
-
t.string "minor_unit_symbol"
|
341
|
-
t.string "ratio_of_minor_unit_to_major_unit"
|
342
|
-
t.string "postfix_label"
|
343
|
-
t.datetime "introduction_date"
|
344
|
-
t.datetime "expiration_date"
|
345
|
-
t.datetime "created_at", :null => false
|
346
|
-
t.datetime "updated_at", :null => false
|
347
|
-
end
|
348
|
-
|
349
|
-
add_index "currencies", ["internal_identifier"], :name => "index_currencies_on_internal_identifier"
|
350
|
-
|
351
|
-
create_table "delayed_jobs", :force => true do |t|
|
352
|
-
t.integer "priority", :default => 0
|
353
|
-
t.integer "attempts", :default => 0
|
354
|
-
t.text "handler"
|
355
|
-
t.text "last_error"
|
356
|
-
t.datetime "run_at"
|
357
|
-
t.datetime "locked_at"
|
358
|
-
t.datetime "failed_at"
|
359
|
-
t.string "locked_by"
|
360
|
-
t.string "queue"
|
361
|
-
t.datetime "created_at", :null => false
|
362
|
-
t.datetime "updated_at", :null => false
|
363
|
-
end
|
364
|
-
|
365
|
-
add_index "delayed_jobs", ["priority", "run_at"], :name => "delayed_jobs_priority"
|
366
|
-
|
367
|
-
create_table "descriptive_assets", :force => true do |t|
|
368
|
-
t.integer "view_type_id"
|
369
|
-
t.string "internal_identifier"
|
370
|
-
t.text "description"
|
371
|
-
t.string "external_identifier"
|
372
|
-
t.string "external_id_source"
|
373
|
-
t.integer "described_record_id"
|
374
|
-
t.string "described_record_type"
|
375
|
-
t.datetime "created_at", :null => false
|
376
|
-
t.datetime "updated_at", :null => false
|
377
|
-
end
|
378
|
-
|
379
|
-
add_index "descriptive_assets", ["described_record_id", "described_record_type"], :name => "described_record_idx"
|
380
|
-
add_index "descriptive_assets", ["view_type_id"], :name => "index_descriptive_assets_on_view_type_id"
|
381
|
-
|
382
|
-
create_table "dynamic_data", :force => true do |t|
|
383
|
-
t.string "reference_type"
|
384
|
-
t.integer "reference_id"
|
385
|
-
t.text "dynamic_attributes"
|
386
|
-
t.integer "created_with_form_id"
|
387
|
-
t.integer "updated_with_form_id"
|
388
|
-
t.integer "created_by_id"
|
389
|
-
t.integer "updated_by_id"
|
390
|
-
t.datetime "created_at", :null => false
|
391
|
-
t.datetime "updated_at", :null => false
|
392
|
-
end
|
393
|
-
|
394
|
-
add_index "dynamic_data", ["created_by_id"], :name => "index_dynamic_data_on_created_by_id"
|
395
|
-
add_index "dynamic_data", ["created_with_form_id"], :name => "index_dynamic_data_on_created_with_form_id"
|
396
|
-
add_index "dynamic_data", ["reference_id"], :name => "index_dynamic_data_on_reference_id"
|
397
|
-
add_index "dynamic_data", ["reference_type"], :name => "index_dynamic_data_on_reference_type"
|
398
|
-
add_index "dynamic_data", ["updated_by_id"], :name => "index_dynamic_data_on_updated_by_id"
|
399
|
-
add_index "dynamic_data", ["updated_with_form_id"], :name => "index_dynamic_data_on_updated_with_form_id"
|
400
|
-
|
401
|
-
create_table "dynamic_form_documents", :force => true do |t|
|
402
|
-
t.integer "dynamic_form_model_id"
|
403
|
-
t.string "type"
|
404
|
-
t.datetime "created_at", :null => false
|
405
|
-
t.datetime "updated_at", :null => false
|
406
|
-
end
|
407
|
-
|
408
|
-
add_index "dynamic_form_documents", ["dynamic_form_model_id"], :name => "index_dynamic_form_documents_on_dynamic_form_model_id"
|
409
|
-
add_index "dynamic_form_documents", ["type"], :name => "index_dynamic_form_documents_on_type"
|
410
|
-
|
411
|
-
create_table "dynamic_form_models", :force => true do |t|
|
412
|
-
t.string "model_name"
|
413
|
-
t.boolean "show_in_multitask", :default => false
|
414
|
-
t.boolean "allow_comments", :default => true
|
415
|
-
t.boolean "allow_files", :default => true
|
416
|
-
t.string "file_security_default", :default => "private"
|
417
|
-
t.datetime "created_at", :null => false
|
418
|
-
t.datetime "updated_at", :null => false
|
419
|
-
end
|
420
|
-
|
421
|
-
create_table "dynamic_forms", :force => true do |t|
|
422
|
-
t.string "description"
|
423
|
-
t.text "definition"
|
424
|
-
t.integer "dynamic_form_model_id"
|
425
|
-
t.string "model_name"
|
426
|
-
t.string "internal_identifier"
|
427
|
-
t.boolean "default"
|
428
|
-
t.string "widget_action", :default => "save"
|
429
|
-
t.string "widget_email_recipients"
|
430
|
-
t.boolean "focus_first_field", :default => true
|
431
|
-
t.boolean "submit_empty_text", :default => false
|
432
|
-
t.string "msg_target", :default => "qtip"
|
433
|
-
t.string "submit_button_label", :default => "Submit"
|
434
|
-
t.string "cancel_button_label", :default => "Cancel"
|
435
|
-
t.text "comment"
|
436
|
-
t.integer "created_by_id"
|
437
|
-
t.integer "updated_by_id"
|
438
|
-
t.datetime "created_at", :null => false
|
439
|
-
t.datetime "updated_at", :null => false
|
440
|
-
end
|
441
|
-
|
442
|
-
add_index "dynamic_forms", ["created_by_id"], :name => "index_dynamic_forms_on_created_by_id"
|
443
|
-
add_index "dynamic_forms", ["dynamic_form_model_id"], :name => "index_dynamic_forms_on_dynamic_form_model_id"
|
444
|
-
add_index "dynamic_forms", ["internal_identifier"], :name => "index_dynamic_forms_on_internal_identifier"
|
445
|
-
add_index "dynamic_forms", ["model_name"], :name => "index_dynamic_forms_on_model_name"
|
446
|
-
add_index "dynamic_forms", ["updated_by_id"], :name => "index_dynamic_forms_on_updated_by_id"
|
447
|
-
|
448
|
-
create_table "email_addresses", :force => true do |t|
|
449
|
-
t.string "email_address"
|
450
|
-
t.string "description"
|
451
|
-
t.datetime "created_at", :null => false
|
452
|
-
t.datetime "updated_at", :null => false
|
453
|
-
end
|
454
|
-
|
455
|
-
create_table "file_assets", :force => true do |t|
|
456
|
-
t.integer "file_asset_holder_id"
|
457
|
-
t.string "file_asset_holder_type"
|
458
|
-
t.string "type"
|
459
|
-
t.string "name"
|
460
|
-
t.string "directory"
|
461
|
-
t.string "data_file_name"
|
462
|
-
t.string "data_content_type"
|
463
|
-
t.integer "data_file_size"
|
464
|
-
t.datetime "data_updated_at"
|
465
|
-
t.string "width"
|
466
|
-
t.string "height"
|
467
|
-
t.datetime "created_at", :null => false
|
468
|
-
t.datetime "updated_at", :null => false
|
469
|
-
end
|
470
|
-
|
471
|
-
add_index "file_assets", ["directory"], :name => "index_file_assets_on_directory"
|
472
|
-
add_index "file_assets", ["file_asset_holder_id", "file_asset_holder_type"], :name => "file_asset_holder_idx"
|
473
|
-
add_index "file_assets", ["name"], :name => "index_file_assets_on_name"
|
474
|
-
add_index "file_assets", ["type"], :name => "index_file_assets_on_type"
|
475
|
-
|
476
|
-
create_table "geo_countries", :force => true do |t|
|
477
|
-
t.string "name"
|
478
|
-
t.string "iso_code_2"
|
479
|
-
t.string "iso_code_3"
|
480
|
-
t.boolean "display", :default => true
|
481
|
-
t.integer "external_id"
|
482
|
-
t.datetime "created_at"
|
483
|
-
end
|
484
|
-
|
485
|
-
add_index "geo_countries", ["iso_code_2"], :name => "index_geo_countries_on_iso_code_2"
|
486
|
-
add_index "geo_countries", ["name"], :name => "index_geo_countries_on_name"
|
487
|
-
|
488
|
-
create_table "geo_zones", :force => true do |t|
|
489
|
-
t.integer "geo_country_id"
|
490
|
-
t.string "zone_code", :default => "2"
|
491
|
-
t.string "zone_name"
|
492
|
-
t.datetime "created_at"
|
493
|
-
end
|
494
|
-
|
495
|
-
add_index "geo_zones", ["geo_country_id"], :name => "index_geo_zones_on_geo_country_id"
|
496
|
-
add_index "geo_zones", ["zone_code"], :name => "index_geo_zones_on_zone_code"
|
497
|
-
add_index "geo_zones", ["zone_name"], :name => "index_geo_zones_on_zone_name"
|
498
|
-
|
499
|
-
create_table "groups", :force => true do |t|
|
500
|
-
t.string "description"
|
501
|
-
t.datetime "created_at", :null => false
|
502
|
-
t.datetime "updated_at", :null => false
|
503
|
-
end
|
504
|
-
|
505
|
-
create_table "individuals", :force => true do |t|
|
506
|
-
t.integer "party_id"
|
507
|
-
t.string "current_last_name"
|
508
|
-
t.string "current_first_name"
|
509
|
-
t.string "current_middle_name"
|
510
|
-
t.string "current_personal_title"
|
511
|
-
t.string "current_suffix"
|
512
|
-
t.string "current_nickname"
|
513
|
-
t.string "gender", :limit => 1
|
514
|
-
t.date "birth_date"
|
515
|
-
t.decimal "height", :precision => 5, :scale => 2
|
516
|
-
t.integer "weight"
|
517
|
-
t.string "mothers_maiden_name"
|
518
|
-
t.string "marital_status", :limit => 1
|
519
|
-
t.string "social_security_number"
|
520
|
-
t.integer "current_passport_number"
|
521
|
-
t.date "current_passport_expire_date"
|
522
|
-
t.integer "total_years_work_experience"
|
523
|
-
t.string "comments"
|
524
|
-
t.string "encrypted_ssn"
|
525
|
-
t.string "temp_ssn"
|
526
|
-
t.string "salt"
|
527
|
-
t.string "ssn_last_four"
|
528
|
-
t.datetime "created_at", :null => false
|
529
|
-
t.datetime "updated_at", :null => false
|
530
|
-
end
|
531
|
-
|
532
|
-
add_index "individuals", ["party_id"], :name => "index_individuals_on_party_id"
|
533
|
-
|
534
|
-
create_table "money", :force => true do |t|
|
535
|
-
t.string "description"
|
536
|
-
t.decimal "amount", :precision => 8, :scale => 2
|
537
|
-
t.integer "currency_id"
|
538
|
-
t.datetime "created_at", :null => false
|
539
|
-
t.datetime "updated_at", :null => false
|
540
|
-
end
|
541
|
-
|
542
|
-
add_index "money", ["currency_id"], :name => "index_money_on_currency_id"
|
543
|
-
|
544
|
-
create_table "note_types", :force => true do |t|
|
545
|
-
t.integer "parent_id"
|
546
|
-
t.integer "lft"
|
547
|
-
t.integer "rgt"
|
548
|
-
t.string "description"
|
549
|
-
t.string "internal_identifier"
|
550
|
-
t.string "external_identifier"
|
551
|
-
t.integer "note_type_record_id"
|
552
|
-
t.string "note_type_record_type"
|
553
|
-
t.datetime "created_at", :null => false
|
554
|
-
t.datetime "updated_at", :null => false
|
555
|
-
end
|
556
|
-
|
557
|
-
add_index "note_types", ["note_type_record_id", "note_type_record_type"], :name => "note_type_record_idx"
|
558
|
-
|
559
|
-
create_table "notes", :force => true do |t|
|
560
|
-
t.integer "created_by_id"
|
561
|
-
t.text "content"
|
562
|
-
t.integer "noted_record_id"
|
563
|
-
t.string "noted_record_type"
|
564
|
-
t.integer "note_type_id"
|
565
|
-
t.datetime "created_at", :null => false
|
566
|
-
t.datetime "updated_at", :null => false
|
567
|
-
end
|
568
|
-
|
569
|
-
add_index "notes", ["created_by_id"], :name => "index_notes_on_created_by_id"
|
570
|
-
add_index "notes", ["note_type_id"], :name => "index_notes_on_note_type_id"
|
571
|
-
add_index "notes", ["noted_record_id", "noted_record_type"], :name => "index_notes_on_noted_record_id_and_noted_record_type"
|
572
|
-
|
573
|
-
create_table "organizations", :force => true do |t|
|
574
|
-
t.string "description"
|
575
|
-
t.string "tax_id_number"
|
576
|
-
t.datetime "created_at", :null => false
|
577
|
-
t.datetime "updated_at", :null => false
|
578
|
-
end
|
579
|
-
|
580
|
-
create_table "parties", :force => true do |t|
|
581
|
-
t.string "description"
|
582
|
-
t.integer "business_party_id"
|
583
|
-
t.string "business_party_type"
|
584
|
-
t.integer "list_view_image_id"
|
585
|
-
t.string "enterprise_identifier"
|
586
|
-
t.datetime "created_at", :null => false
|
587
|
-
t.datetime "updated_at", :null => false
|
588
|
-
end
|
589
|
-
|
590
|
-
add_index "parties", ["business_party_id", "business_party_type"], :name => "besi_1"
|
591
|
-
|
592
|
-
create_table "parties_security_roles", :id => false, :force => true do |t|
|
593
|
-
t.integer "party_id"
|
594
|
-
t.integer "security_role_id"
|
595
|
-
end
|
596
|
-
|
597
|
-
add_index "parties_security_roles", ["party_id"], :name => "index_parties_security_roles_on_party_id"
|
598
|
-
add_index "parties_security_roles", ["security_role_id"], :name => "index_parties_security_roles_on_security_role_id"
|
599
|
-
|
600
|
-
create_table "party_relationships", :force => true do |t|
|
601
|
-
t.string "description"
|
602
|
-
t.integer "party_id_from"
|
603
|
-
t.integer "party_id_to"
|
604
|
-
t.integer "role_type_id_from"
|
605
|
-
t.integer "role_type_id_to"
|
606
|
-
t.integer "status_type_id"
|
607
|
-
t.integer "priority_type_id"
|
608
|
-
t.integer "relationship_type_id"
|
609
|
-
t.date "from_date"
|
610
|
-
t.date "thru_date"
|
611
|
-
t.string "external_identifier"
|
612
|
-
t.string "external_id_source"
|
613
|
-
t.datetime "created_at", :null => false
|
614
|
-
t.datetime "updated_at", :null => false
|
615
|
-
end
|
616
|
-
|
617
|
-
add_index "party_relationships", ["priority_type_id"], :name => "index_party_relationships_on_priority_type_id"
|
618
|
-
add_index "party_relationships", ["relationship_type_id"], :name => "index_party_relationships_on_relationship_type_id"
|
619
|
-
add_index "party_relationships", ["status_type_id"], :name => "index_party_relationships_on_status_type_id"
|
620
|
-
|
621
|
-
create_table "party_roles", :force => true do |t|
|
622
|
-
t.string "type"
|
623
|
-
t.integer "party_id"
|
624
|
-
t.integer "role_type_id"
|
625
|
-
t.datetime "created_at", :null => false
|
626
|
-
t.datetime "updated_at", :null => false
|
627
|
-
end
|
628
|
-
|
629
|
-
add_index "party_roles", ["party_id"], :name => "index_party_roles_on_party_id"
|
630
|
-
add_index "party_roles", ["role_type_id"], :name => "index_party_roles_on_role_type_id"
|
631
|
-
|
632
|
-
create_table "party_search_facts", :force => true do |t|
|
633
|
-
t.integer "party_id"
|
634
|
-
t.string "eid"
|
635
|
-
t.string "type"
|
636
|
-
t.text "roles"
|
637
|
-
t.string "party_description"
|
638
|
-
t.string "party_business_party_type"
|
639
|
-
t.string "user_login"
|
640
|
-
t.string "individual_current_last_name"
|
641
|
-
t.string "individual_current_first_name"
|
642
|
-
t.string "individual_current_middle_name"
|
643
|
-
t.string "individual_birth_date"
|
644
|
-
t.string "individual_ssn"
|
645
|
-
t.string "party_phone_number"
|
646
|
-
t.string "party_email_address"
|
647
|
-
t.string "party_address_1"
|
648
|
-
t.string "party_address_2"
|
649
|
-
t.string "party_primary_address_city"
|
650
|
-
t.string "party_primary_address_state"
|
651
|
-
t.string "party_primary_address_zip"
|
652
|
-
t.string "party_primary_address_country"
|
653
|
-
t.boolean "user_enabled"
|
654
|
-
t.string "user_type"
|
655
|
-
t.boolean "reindex"
|
656
|
-
t.datetime "created_at", :null => false
|
657
|
-
t.datetime "updated_at", :null => false
|
658
|
-
end
|
659
|
-
|
660
|
-
create_table "phone_numbers", :force => true do |t|
|
661
|
-
t.string "phone_number"
|
662
|
-
t.string "description"
|
663
|
-
t.datetime "created_at", :null => false
|
664
|
-
t.datetime "updated_at", :null => false
|
665
|
-
end
|
666
|
-
|
667
|
-
create_table "postal_addresses", :force => true do |t|
|
668
|
-
t.string "address_line_1"
|
669
|
-
t.string "address_line_2"
|
670
|
-
t.string "city"
|
671
|
-
t.string "state"
|
672
|
-
t.string "zip"
|
673
|
-
t.string "country"
|
674
|
-
t.string "description"
|
675
|
-
t.integer "geo_country_id"
|
676
|
-
t.integer "geo_zone_id"
|
677
|
-
t.datetime "created_at", :null => false
|
678
|
-
t.datetime "updated_at", :null => false
|
679
|
-
end
|
680
|
-
|
681
|
-
add_index "postal_addresses", ["geo_country_id"], :name => "index_postal_addresses_on_geo_country_id"
|
682
|
-
add_index "postal_addresses", ["geo_zone_id"], :name => "index_postal_addresses_on_geo_zone_id"
|
683
|
-
|
684
|
-
create_table "preference_options", :force => true do |t|
|
685
|
-
t.string "description"
|
686
|
-
t.string "internal_identifier"
|
687
|
-
t.string "value"
|
688
|
-
t.datetime "created_at", :null => false
|
689
|
-
t.datetime "updated_at", :null => false
|
690
|
-
end
|
691
|
-
|
692
|
-
create_table "preference_options_preference_types", :id => false, :force => true do |t|
|
693
|
-
t.integer "preference_type_id"
|
694
|
-
t.integer "preference_option_id"
|
695
|
-
end
|
696
|
-
|
697
|
-
add_index "preference_options_preference_types", ["preference_option_id"], :name => "pref_opt_pref_type_pref_opt_id_idx"
|
698
|
-
add_index "preference_options_preference_types", ["preference_type_id"], :name => "pref_opt_pref_type_pref_type_id_idx"
|
699
|
-
|
700
|
-
create_table "preference_types", :force => true do |t|
|
701
|
-
t.string "description"
|
702
|
-
t.string "internal_identifier"
|
703
|
-
t.integer "default_pref_option_id"
|
704
|
-
t.datetime "created_at", :null => false
|
705
|
-
t.datetime "updated_at", :null => false
|
706
|
-
end
|
707
|
-
|
708
|
-
add_index "preference_types", ["default_pref_option_id"], :name => "index_preference_types_on_default_pref_option_id"
|
709
|
-
|
710
|
-
create_table "preferences", :force => true do |t|
|
711
|
-
t.integer "preference_option_id"
|
712
|
-
t.integer "preference_type_id"
|
713
|
-
t.datetime "created_at", :null => false
|
714
|
-
t.datetime "updated_at", :null => false
|
715
|
-
end
|
716
|
-
|
717
|
-
add_index "preferences", ["preference_option_id"], :name => "index_preferences_on_preference_option_id"
|
718
|
-
add_index "preferences", ["preference_type_id"], :name => "index_preferences_on_preference_type_id"
|
719
|
-
|
720
|
-
create_table "relationship_types", :force => true do |t|
|
721
|
-
t.integer "parent_id"
|
722
|
-
t.integer "lft"
|
723
|
-
t.integer "rgt"
|
724
|
-
t.integer "valid_from_role_type_id"
|
725
|
-
t.integer "valid_to_role_type_id"
|
726
|
-
t.string "name"
|
727
|
-
t.string "description"
|
728
|
-
t.string "internal_identifier"
|
729
|
-
t.string "external_identifier"
|
730
|
-
t.string "external_id_source"
|
731
|
-
t.datetime "created_at", :null => false
|
732
|
-
t.datetime "updated_at", :null => false
|
733
|
-
end
|
734
|
-
|
735
|
-
add_index "relationship_types", ["valid_from_role_type_id"], :name => "index_relationship_types_on_valid_from_role_type_id"
|
736
|
-
add_index "relationship_types", ["valid_to_role_type_id"], :name => "index_relationship_types_on_valid_to_role_type_id"
|
737
|
-
|
738
|
-
create_table "role_types", :force => true do |t|
|
739
|
-
t.integer "parent_id"
|
740
|
-
t.integer "lft"
|
741
|
-
t.integer "rgt"
|
742
|
-
t.string "description"
|
743
|
-
t.string "comments"
|
744
|
-
t.string "internal_identifier"
|
745
|
-
t.string "external_identifier"
|
746
|
-
t.string "external_id_source"
|
747
|
-
t.datetime "created_at", :null => false
|
748
|
-
t.datetime "updated_at", :null => false
|
749
|
-
end
|
750
|
-
|
751
|
-
create_table "scope_types", :force => true do |t|
|
752
|
-
t.string "description"
|
753
|
-
t.string "internal_identifier"
|
754
|
-
t.datetime "created_at", :null => false
|
755
|
-
t.datetime "updated_at", :null => false
|
756
|
-
end
|
757
|
-
|
758
|
-
add_index "scope_types", ["internal_identifier"], :name => "index_scope_types_on_internal_identifier"
|
759
|
-
|
760
|
-
create_table "security_roles", :force => true do |t|
|
761
|
-
t.string "description"
|
762
|
-
t.string "internal_identifier"
|
763
|
-
t.string "external_identifier"
|
764
|
-
t.string "external_id_source"
|
765
|
-
t.datetime "created_at", :null => false
|
766
|
-
t.datetime "updated_at", :null => false
|
767
|
-
end
|
768
|
-
|
769
|
-
create_table "sessions", :force => true do |t|
|
770
|
-
t.string "session_id", :null => false
|
771
|
-
t.text "data"
|
772
|
-
t.datetime "created_at", :null => false
|
773
|
-
t.datetime "updated_at", :null => false
|
774
|
-
end
|
775
|
-
|
776
|
-
add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id"
|
777
|
-
add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at"
|
778
|
-
|
779
|
-
create_table "tickets", :force => true do |t|
|
780
|
-
t.datetime "created_at", :null => false
|
781
|
-
t.datetime "updated_at", :null => false
|
782
|
-
end
|
783
|
-
|
784
|
-
create_table "tree_menu_node_defs", :force => true do |t|
|
785
|
-
t.string "node_type"
|
786
|
-
t.integer "parent_id"
|
787
|
-
t.integer "lft"
|
788
|
-
t.integer "rgt"
|
789
|
-
t.string "menu_short_name"
|
790
|
-
t.string "menu_description"
|
791
|
-
t.string "text"
|
792
|
-
t.string "icon_url"
|
793
|
-
t.string "target_url"
|
794
|
-
t.string "resource_class"
|
795
|
-
t.datetime "created_at", :null => false
|
796
|
-
t.datetime "updated_at", :null => false
|
797
|
-
end
|
798
|
-
|
799
|
-
add_index "tree_menu_node_defs", ["parent_id"], :name => "index_tree_menu_node_defs_on_parent_id"
|
800
|
-
|
801
|
-
create_table "user_preferences", :force => true do |t|
|
802
|
-
t.integer "user_id"
|
803
|
-
t.integer "preference_id"
|
804
|
-
t.integer "preferenced_record_id"
|
805
|
-
t.string "preferenced_record_type"
|
806
|
-
t.datetime "created_at", :null => false
|
807
|
-
t.datetime "updated_at", :null => false
|
808
|
-
end
|
809
|
-
|
810
|
-
add_index "user_preferences", ["preference_id"], :name => "index_user_preferences_on_preference_id"
|
811
|
-
add_index "user_preferences", ["preferenced_record_id"], :name => "index_user_preferences_on_preferenced_record_id"
|
812
|
-
add_index "user_preferences", ["preferenced_record_type"], :name => "index_user_preferences_on_preferenced_record_type"
|
813
|
-
add_index "user_preferences", ["user_id"], :name => "index_user_preferences_on_user_id"
|
814
|
-
|
815
|
-
create_table "users", :force => true do |t|
|
816
|
-
t.string "username"
|
817
|
-
t.string "email"
|
818
|
-
t.integer "party_id"
|
819
|
-
t.string "type"
|
820
|
-
t.string "salt"
|
821
|
-
t.string "crypted_password"
|
822
|
-
t.datetime "last_login_at"
|
823
|
-
t.datetime "last_logout_at"
|
824
|
-
t.datetime "last_activity_at"
|
825
|
-
t.integer "failed_logins_count", :default => 0
|
826
|
-
t.datetime "lock_expires_at"
|
827
|
-
t.string "remember_me_token"
|
828
|
-
t.datetime "remember_me_token_expires_at"
|
829
|
-
t.string "reset_password_token"
|
830
|
-
t.datetime "reset_password_token_expires_at"
|
831
|
-
t.datetime "reset_password_email_sent_at"
|
832
|
-
t.string "activation_state"
|
833
|
-
t.string "activation_token"
|
834
|
-
t.datetime "activation_token_expires_at"
|
835
|
-
t.string "security_question_1"
|
836
|
-
t.string "security_answer_1"
|
837
|
-
t.string "security_question_2"
|
838
|
-
t.string "security_answer_2"
|
839
|
-
t.datetime "created_at", :null => false
|
840
|
-
t.datetime "updated_at", :null => false
|
841
|
-
end
|
842
|
-
|
843
|
-
add_index "users", ["activation_token"], :name => "index_users_on_activation_token"
|
844
|
-
add_index "users", ["email"], :name => "index_users_on_email", :unique => true
|
845
|
-
add_index "users", ["last_logout_at", "last_activity_at"], :name => "activity_idx"
|
846
|
-
add_index "users", ["remember_me_token"], :name => "index_users_on_remember_me_token"
|
847
|
-
add_index "users", ["reset_password_token"], :name => "index_users_on_reset_password_token"
|
848
|
-
add_index "users", ["username"], :name => "index_users_on_username", :unique => true
|
849
|
-
|
850
|
-
create_table "valid_configurations", :force => true do |t|
|
851
|
-
t.integer "configured_item_id"
|
852
|
-
t.string "configured_item_type"
|
853
|
-
t.integer "configuration_id"
|
854
|
-
t.datetime "created_at", :null => false
|
855
|
-
t.datetime "updated_at", :null => false
|
856
|
-
end
|
857
|
-
|
858
|
-
add_index "valid_configurations", ["configuration_id"], :name => "index_valid_configurations_on_configuration_id"
|
859
|
-
add_index "valid_configurations", ["configured_item_id", "configured_item_type"], :name => "configured_item_poly_idx"
|
860
|
-
|
861
|
-
create_table "valid_note_types", :force => true do |t|
|
862
|
-
t.integer "valid_note_type_record_id"
|
863
|
-
t.string "valid_note_type_record_type"
|
864
|
-
t.integer "note_type_id"
|
865
|
-
t.datetime "created_at", :null => false
|
866
|
-
t.datetime "updated_at", :null => false
|
867
|
-
end
|
868
|
-
|
869
|
-
add_index "valid_note_types", ["note_type_id"], :name => "index_valid_note_types_on_note_type_id"
|
870
|
-
add_index "valid_note_types", ["valid_note_type_record_id", "valid_note_type_record_type"], :name => "valid_note_type_record_idx"
|
871
|
-
|
872
|
-
create_table "valid_preference_types", :force => true do |t|
|
873
|
-
t.integer "preference_type_id"
|
874
|
-
t.integer "preferenced_record_id"
|
875
|
-
t.string "preferenced_record_type"
|
876
|
-
end
|
877
|
-
|
878
|
-
create_table "view_types", :force => true do |t|
|
879
|
-
t.string "internal_identifier"
|
880
|
-
t.string "description"
|
881
|
-
t.datetime "created_at", :null => false
|
882
|
-
t.datetime "updated_at", :null => false
|
883
|
-
end
|
884
|
-
|
885
|
-
create_table "widgets", :force => true do |t|
|
886
|
-
t.string "description"
|
887
|
-
t.string "internal_identifier"
|
888
|
-
t.string "icon"
|
889
|
-
t.string "xtype"
|
890
|
-
t.datetime "created_at", :null => false
|
891
|
-
t.datetime "updated_at", :null => false
|
892
|
-
end
|
893
|
-
|
894
|
-
end
|