Fixed migration for initial setup.

This commit is contained in:
Martin Edenhofer 2016-04-23 11:20:40 +02:00
parent 4646aca840
commit 9602597e1c
2 changed files with 5 additions and 2 deletions

View file

@ -15,8 +15,8 @@
<tbody> <tbody>
<% for item in @list: %> <% for item in @list: %>
<tr> <tr>
<td><%= item.from %></td> <td><%= item.from %><% if item.from_comment: %> (<%= item.from_comment %>)<% end %></td>
<td><%= item.to %></td> <td><%= item.to %><% if item.to_comment: %> (<%= item.to_comment %>)<% end %></td>
<td><%= item.state %></td> <td><%= item.state %></td>
<td><%= item.comment %></td> <td><%= item.comment %></td>
<td><%- @humanTime(item.created_at) %></td> <td><%- @humanTime(item.created_at) %></td>

View file

@ -15,6 +15,9 @@ class CreateCtiLog < ActiveRecord::Migration
add_index :cti_logs, [:direction] add_index :cti_logs, [:direction]
add_index :cti_logs, [:from] add_index :cti_logs, [:from]
# return if it's a new setup
return if !Setting.find_by(name: 'system_init_done')
Role.create_if_not_exists( Role.create_if_not_exists(
name: 'CTI', name: 'CTI',
note: 'Access to CTI feature.', note: 'Access to CTI feature.',