Added missing id's for mariadb cluster support.

This commit is contained in:
Martin Edenhofer 2015-02-15 08:47:32 +01:00
parent edea39d431
commit 01fcde5397

View file

@ -1254,6 +1254,7 @@ email_address = EmailAddress.create_if_not_exists(
:created_by_id => 1 :created_by_id => 1
) )
signature = Signature.create_if_not_exists( signature = Signature.create_if_not_exists(
:id => 1,
:name => 'default', :name => 'default',
:body => ' :body => '
#{user.firstname} #{user.lastname} #{user.firstname} #{user.lastname}
@ -1300,6 +1301,7 @@ Group.create_if_not_exists(
) )
user = User.create_if_not_exists( user = User.create_if_not_exists(
:id => 1,
:login => '-', :login => '-',
:firstname => '-', :firstname => '-',
:lastname => '', :lastname => '',
@ -1315,9 +1317,11 @@ roles = Role.where( :name => 'Customer' )
organizations = Organization.all organizations = Organization.all
groups = Group.all groups = Group.all
org_community = Organization.create_if_not_exists( org_community = Organization.create_if_not_exists(
:id => 1,
:name => 'Zammad Foundation', :name => 'Zammad Foundation',
) )
user_community = User.create_or_update( user_community = User.create_or_update(
:id => 2,
:login => 'nicole.braun@zammad.org', :login => 'nicole.braun@zammad.org',
:firstname => 'Nicole', :firstname => 'Nicole',
:lastname => 'Braun', :lastname => 'Braun',
@ -1328,12 +1332,12 @@ user_community = User.create_or_update(
:organization_id => org_community.id, :organization_id => org_community.id,
) )
Link::Type.create_if_not_exists( :name => 'normal' ) Link::Type.create_if_not_exists( :id => 1, :name => 'normal' )
Link::Object.create_if_not_exists( :name => 'Ticket' ) Link::Object.create_if_not_exists( :id => 2, :name => 'Ticket' )
Link::Object.create_if_not_exists( :name => 'Announcement' ) Link::Object.create_if_not_exists( :id => 3, :name => 'Announcement' )
Link::Object.create_if_not_exists( :name => 'Question/Answer' ) Link::Object.create_if_not_exists( :id => 4, :name => 'Question/Answer' )
Link::Object.create_if_not_exists( :name => 'Idea' ) Link::Object.create_if_not_exists( :id => 5, :name => 'Idea' )
Link::Object.create_if_not_exists( :name => 'Bug' ) Link::Object.create_if_not_exists( :id => 6, :name => 'Bug' )
Ticket::StateType.create_if_not_exists( :id => 1, :name => 'new' ) Ticket::StateType.create_if_not_exists( :id => 1, :name => 'new' )
Ticket::StateType.create_if_not_exists( :id => 2, :name => 'open' ) Ticket::StateType.create_if_not_exists( :id => 2, :name => 'open' )
@ -1351,24 +1355,24 @@ Ticket::State.create_if_not_exists( :id => 5, :name => 'merged', :state_type_id
Ticket::State.create_if_not_exists( :id => 6, :name => 'removed', :state_type_id => Ticket::StateType.where(:name => 'removed').first.id, :active => false ) Ticket::State.create_if_not_exists( :id => 6, :name => 'removed', :state_type_id => Ticket::StateType.where(:name => 'removed').first.id, :active => false )
Ticket::State.create_if_not_exists( :id => 7, :name => 'pending close', :state_type_id => Ticket::StateType.where(:name => 'pending action').first.id, :next_state_id => 5 ) Ticket::State.create_if_not_exists( :id => 7, :name => 'pending close', :state_type_id => Ticket::StateType.where(:name => 'pending action').first.id, :next_state_id => 5 )
Ticket::Priority.create_if_not_exists( :name => '1 low' ) Ticket::Priority.create_if_not_exists( :id => 1, :name => '1 low' )
Ticket::Priority.create_if_not_exists( :name => '2 normal' ) Ticket::Priority.create_if_not_exists( :id => 2, :name => '2 normal' )
Ticket::Priority.create_if_not_exists( :name => '3 high' ) Ticket::Priority.create_if_not_exists( :id => 3, :name => '3 high' )
Ticket::Article::Type.create_if_not_exists( :name => 'email', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 1, :name => 'email', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'sms', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 2, :name => 'sms', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'chat', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 3, :name => 'chat', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'fax', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 4, :name => 'fax', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'phone', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 5, :name => 'phone', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'twitter status', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 6, :name => 'twitter status', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'twitter direct-message', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 7, :name => 'twitter direct-message', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'facebook', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 8, :name => 'facebook', :communication => true )
Ticket::Article::Type.create_if_not_exists( :name => 'note', :communication => false ) Ticket::Article::Type.create_if_not_exists( :id => 9, :name => 'note', :communication => false )
Ticket::Article::Type.create_if_not_exists( :name => 'web', :communication => true ) Ticket::Article::Type.create_if_not_exists( :id => 10, :name => 'web', :communication => true )
Ticket::Article::Sender.create_if_not_exists( :name => 'Agent' ) Ticket::Article::Sender.create_if_not_exists( :id => 1, :name => 'Agent' )
Ticket::Article::Sender.create_if_not_exists( :name => 'Customer' ) Ticket::Article::Sender.create_if_not_exists( :id => 2, :name => 'Customer' )
Ticket::Article::Sender.create_if_not_exists( :name => 'System' ) Ticket::Article::Sender.create_if_not_exists( :id => 3, :name => 'System' )
UserInfo.current_user_id = user_community.id UserInfo.current_user_id = user_community.id
ticket = Ticket.create( ticket = Ticket.create(
@ -1589,31 +1593,39 @@ Channel.create_if_not_exists(
) )
network = Network.create_if_not_exists( network = Network.create_if_not_exists(
:name => 'base', :id => 1,
:name => 'base',
) )
Network::Category::Type.create_if_not_exists( Network::Category::Type.create_if_not_exists(
:name => 'Announcement', :id => 1,
:name => 'Announcement',
) )
Network::Category::Type.create_if_not_exists( Network::Category::Type.create_if_not_exists(
:id => 2,
:name => 'Idea', :name => 'Idea',
) )
Network::Category::Type.create_if_not_exists( Network::Category::Type.create_if_not_exists(
:id => 1,
:name => 'Question', :name => 'Question',
) )
Network::Category::Type.create_if_not_exists( Network::Category::Type.create_if_not_exists(
:id => 1,
:name => 'Bug Report', :name => 'Bug Report',
) )
Network::Privacy.create_if_not_exists( Network::Privacy.create_if_not_exists(
:id => 1,
:name => 'logged in', :name => 'logged in',
:key => 'loggedIn', :key => 'loggedIn',
) )
Network::Privacy.create_if_not_exists( Network::Privacy.create_if_not_exists(
:id => 2,
:name => 'logged in and moderator', :name => 'logged in and moderator',
:key => 'loggedInModerator', :key => 'loggedInModerator',
) )
Network::Category.create_if_not_exists( Network::Category.create_if_not_exists(
:id => 1,
:name => 'Announcements', :name => 'Announcements',
:network_id => network.id, :network_id => network.id,
:allow_comments => true, :allow_comments => true,
@ -1622,6 +1634,7 @@ Network::Category.create_if_not_exists(
:allow_comments => true, :allow_comments => true,
) )
Network::Category.create_if_not_exists( Network::Category.create_if_not_exists(
:id => 2,
:name => 'Questions', :name => 'Questions',
:network_id => network.id, :network_id => network.id,
:allow_comments => true, :allow_comments => true,
@ -1630,6 +1643,7 @@ Network::Category.create_if_not_exists(
# :network_categories_moderator_user_ids => User.where(:login => '-').first.id, # :network_categories_moderator_user_ids => User.where(:login => '-').first.id,
) )
Network::Category.create_if_not_exists( Network::Category.create_if_not_exists(
:id => 3,
:name => 'Ideas', :name => 'Ideas',
:network_id => network.id, :network_id => network.id,
:allow_comments => true, :allow_comments => true,
@ -1638,6 +1652,7 @@ Network::Category.create_if_not_exists(
:allow_comments => true, :allow_comments => true,
) )
Network::Category.create_if_not_exists( Network::Category.create_if_not_exists(
:id => 4,
:name => 'Bug Reports', :name => 'Bug Reports',
:network_id => network.id, :network_id => network.id,
:allow_comments => true, :allow_comments => true,