Reworked object manager migrations.

This commit is contained in:
Martin Edenhofer 2014-12-17 14:00:25 +01:00
parent 7e3e4f7799
commit bc42f7fbb1
6 changed files with 765 additions and 1187 deletions

View file

@ -21,26 +21,22 @@ class CreateObjectManager < ActiveRecord::Migration
t.column :updated_by_id, :integer, :null => false
t.timestamps
end
add_index :object_manager_attributes, [:name], :unique => true
add_index :object_manager_attributes, [:object_lookup_id, :name], :unique => true
add_index :object_manager_attributes, [:object_lookup_id]
ObjectManager::Attribute.add(
:object => 'Ticket',
:name => 'customer_id',
:display => 'Customer',
:data_type => 'autocompletion',
:data_type => 'user_autocompletion',
:data_option => {
:relation => 'User',
:autocapitalize => false,
:multiple => false,
:null => false,
:limit => 200,
:placeholder => 'Enter Person or Organisation/Company',
:help => 'Select the customer of the Ticket or create one.',
:helpLink => '<a href="" class="customer_new">&raquo;</a>',
:minLengt => 2,
:translate => false,
:source => '#{@apiPath}/users/search',
:multiple => false,
:null => false,
:limit => 200,
:placeholder => 'Enter Person or Organisation/Company',
:minLengt => 2,
:translate => false,
},
:editable => false,
:active => true,
@ -58,7 +54,6 @@ class CreateObjectManager < ActiveRecord::Migration
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'Ticket',
:name => 'type',
@ -456,9 +451,9 @@ class CreateObjectManager < ActiveRecord::Migration
:object => 'TicketArticle',
:name => 'body',
:display => 'Text',
:data_type => 'textarea',
:data_type => 'richtext',
:data_option => {
:type => 'text',
:type => 'textonly',
:maxlength => 20000,
:upload => true,
:rows => 8,
@ -487,525 +482,6 @@ class CreateObjectManager < ActiveRecord::Migration
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'login',
:display => 'Login',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:autocapitalize => false,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {},
},
:pending_migration => false,
:position => 100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'firstname',
:display => 'Firstname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'lastname',
:display => 'Lastname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'email',
:display => 'Email',
:data_type => 'input',
:data_option => {
:type => 'email',
:maxlength => 150,
:null => false,
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'web',
:display => 'Web',
:data_type => 'input',
:data_option => {
:type => 'url',
:maxlength => 250,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'phone',
:display => 'Phone',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'mobile',
:display => 'Mobile',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'fax',
:display => 'Fax',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 800,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'organization_id',
:display => 'Organization',
:data_type => 'select',
:data_option => {
:multiple => false,
:nulloption => true,
:null => true,
:relation => 'Organization',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 900,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'department',
:display => 'Department',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 200,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1000,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'street',
:display => 'Street',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'zip',
:display => 'Zip',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'city',
:display => 'City',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'password',
:display => 'Password',
:data_type => 'input',
:data_option => {
:type => 'password',
:maxlength => 100,
:null => true,
:autocomplete => 'off',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => true,
},
},
:invite_agent => {},
:edit => {
:Admin => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'note',
:display => 'Note',
:data_type => 'textarea',
:data_option => {
:type => 'text',
:maxlength => 250,
:null => true,
:note => 'Notes are visible to agents only, never to customers.',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'role_ids',
:display => 'Roles',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => false,
:relation => 'Role',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
},
:pending_migration => false,
:position => 1600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'group_ids',
:display => 'Groups',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => true,
:relation => 'Group',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
:Admin => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'active',
:display => 'Active',
:data_type => 'boolean',
:data_option => {
:maxlength => 250,
:null => true,
:default => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
},
:pending_migration => false,
:position => 1800,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down

View file

@ -1,38 +0,0 @@
class UpdateObjectManager2 < ActiveRecord::Migration
def up
ObjectManager::Attribute.add(
:object => 'Ticket',
:name => 'customer_id',
:display => 'Customer',
:data_type => 'user_autocompletion',
:data_option => {
:autocapitalize => false,
:multiple => false,
:null => false,
:limit => 200,
:placeholder => 'Enter Person or Organisation/Company',
:minLengt => 2,
:translate => false,
},
:editable => false,
:active => true,
:screens => {
:create_top => {
:Agent => {
:null => false,
},
},
:edit => {},
},
:pending_migration => false,
:position => 10,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down
end
end

View file

@ -1,32 +0,0 @@
class UpdateObjectManager3 < ActiveRecord::Migration
def up
ObjectManager::Attribute.add(
:object => 'User',
:name => 'login',
:display => 'Login',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:autocapitalize => false,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {},
},
:pending_migration => false,
:position => 100,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down
end
end

View file

@ -1,43 +0,0 @@
class UpdateObjectManager4 < ActiveRecord::Migration
def up
ObjectManager::Attribute.add(
:object => 'TicketArticle',
:name => 'body',
:display => 'Text',
:data_type => 'richtext',
:data_option => {
:type => 'textonly',
:maxlength => 20000,
:upload => true,
:rows => 8,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:create_top => {
'-all-' => {
:null => false,
},
},
:edit => {
:Agent => {
:null => true,
},
:Customer => {
:null => false,
},
},
},
:pending_migration => false,
:position => 600,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down
end
end

View file

@ -1,540 +0,0 @@
class UpdateObjectManager5 < ActiveRecord::Migration
def up
ObjectManager::Attribute.add(
:object => 'User',
:name => 'login',
:display => 'Login',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:autocapitalize => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {},
},
:pending_migration => false,
:position => 100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'firstname',
:display => 'Firstname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'lastname',
:display => 'Lastname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'email',
:display => 'Email',
:data_type => 'input',
:data_option => {
:type => 'email',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
},
:pending_migration => false,
:position => 400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'web',
:display => 'Web',
:data_type => 'input',
:data_option => {
:type => 'url',
:maxlength => 250,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'phone',
:display => 'Phone',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'mobile',
:display => 'Mobile',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'fax',
:display => 'Fax',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 800,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'organization_id',
:display => 'Organization',
:data_type => 'select',
:data_option => {
:multiple => false,
:nulloption => true,
:null => true,
:relation => 'Organization',
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 900,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'department',
:display => 'Department',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 200,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1000,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'street',
:display => 'Street',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'zip',
:display => 'Zip',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'city',
:display => 'City',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'password',
:display => 'Password',
:data_type => 'input',
:data_option => {
:type => 'password',
:maxlength => 100,
:null => true,
:autocomplete => 'off',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {},
:edit => {
:Admin => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'note',
:display => 'Note',
:data_type => 'textarea',
:data_option => {
:type => 'text',
:maxlength => 250,
:null => true,
:note => 'Notes are visible to agents only, never to customers.',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'role_ids',
:display => 'Roles',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => false,
:relation => 'Role',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
},
:pending_migration => false,
:position => 1600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'group_ids',
:display => 'Groups',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => true,
:relation => 'Group',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
:Admin => {
:null => true,
},
},
},
:pending_migration => false,
:position => 1700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'active',
:display => 'Active',
:data_type => 'boolean',
:data_option => {
:maxlength => 250,
:null => true,
:default => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
},
:pending_migration => false,
:position => 1800,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down
drop_table :object_manager_attributes
end
end

View file

@ -0,0 +1,755 @@
class UpdateObjectManager2 < ActiveRecord::Migration
def up
remove_index :object_manager_attributes, [:name]
ObjectManager::Attribute.add(
:object => 'User',
:name => 'login',
:display => 'Login',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:autocapitalize => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {},
:view => {
'-all-' => {
:shown => false,
},
},
},
:pending_migration => false,
:position => 100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'firstname',
:display => 'Firstname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'lastname',
:display => 'Lastname',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'email',
:display => 'Email',
:data_type => 'input',
:data_option => {
:type => 'email',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
'-all-' => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'web',
:display => 'Web',
:data_type => 'input',
:data_option => {
:type => 'url',
:maxlength => 250,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'phone',
:display => 'Phone',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'mobile',
:display => 'Mobile',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'fax',
:display => 'Fax',
:data_type => 'input',
:data_option => {
:type => 'phone',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 800,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'organization_id',
:display => 'Organization',
:data_type => 'select',
:data_option => {
:multiple => false,
:nulloption => true,
:null => true,
:relation => 'Organization',
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 900,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'department',
:display => 'Department',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 200,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1000,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'street',
:display => 'Street',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1100,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'zip',
:display => 'Zip',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'city',
:display => 'City',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 100,
:null => true,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1300,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'password',
:display => 'Password',
:data_type => 'input',
:data_option => {
:type => 'password',
:maxlength => 100,
:null => true,
:autocomplete => 'off',
},
:editable => false,
:active => true,
:screens => {
:signup => {
'-all-' => {
:null => false,
},
},
:invite_agent => {},
:edit => {
:Admin => {
:null => true,
},
},
:view => {}
},
:pending_migration => false,
:position => 1400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'note',
:display => 'Note',
:data_type => 'richtext',
:data_option => {
:type => 'text',
:maxlength => 250,
:null => true,
:note => 'Notes are visible to agents only, never to customers.',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'role_ids',
:display => 'Roles',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => false,
:relation => 'Role',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => false,
},
},
},
:pending_migration => false,
:position => 1600,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'group_ids',
:display => 'Groups',
:data_type => 'checkbox',
:data_option => {
:multiple => true,
:null => true,
:relation => 'Group',
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {
'-all-' => {
:null => false,
},
},
:edit => {
:Admin => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => false,
},
},
},
:pending_migration => false,
:position => 1700,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'User',
:name => 'active',
:display => 'Active',
:data_type => 'boolean',
:data_option => {
:maxlength => 250,
:null => true,
:default => true,
},
:editable => false,
:active => true,
:screens => {
:signup => {},
:invite_agent => {},
:edit => {
:Admin => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => false,
},
},
},
:pending_migration => false,
:position => 1800,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'Organization',
:name => 'name',
:display => 'Name',
:data_type => 'input',
:data_option => {
:type => 'text',
:maxlength => 150,
:null => false,
:item_class => 'formGroup--halfSize',
},
:editable => false,
:active => true,
:screens => {
:edit => {
'-all-' => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 200,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'Organization',
:name => 'shared',
:display => 'Shared organization',
:data_type => 'boolean',
:data_option => {
:maxlength => 250,
:null => true,
:default => true,
:note => 'Customers in the organization can view each other items.',
:item_class => 'formGroup--halfSize',
:options => {
:true => 'Yes',
:false => 'No',
}
},
:editable => false,
:active => true,
:screens => {
:edit => {
:Admin => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1400,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'Organization',
:name => 'note',
:display => 'Note',
:data_type => 'richtext',
:data_option => {
:type => 'text',
:maxlength => 250,
:null => true,
:note => 'Notes are visible to agents only, never to customers.',
},
:editable => false,
:active => true,
:screens => {
:edit => {
'-all-' => {
:null => true,
},
},
:view => {
'-all-' => {
:shown => true,
},
},
},
:pending_migration => false,
:position => 1500,
:created_by_id => 1,
:updated_by_id => 1,
)
ObjectManager::Attribute.add(
:object => 'Organization',
:name => 'active',
:display => 'Active',
:data_type => 'boolean',
:data_option => {
:maxlength => 250,
:null => true,
:default => true,
},
:editable => false,
:active => true,
:screens => {
:edit => {
:Admin => {
:null => false,
},
},
:view => {
'-all-' => {
:shown => false,
},
},
},
:pending_migration => false,
:position => 1800,
:created_by_id => 1,
:updated_by_id => 1,
)
end
def down
end
end