Project

General

Profile

Defect #30437 ยป Validation failed.txt

SOE Redmine, 2019-01-15 15:22

 
1
== 20170418090031 AddViewNewsToAllExistingRoles: migrating ====================
2
rake aborted!
3
StandardError: An error has occurred, all later migrations canceled:
4

    
5
Validation failed: Name has already been taken
6
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/validations.rb:80:in `raise_validation_error'
7
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/validations.rb:52:in `save!'
8
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:315:in `block in save!'
9
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
10
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
11
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
12
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
13
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
14
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
15
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
16
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
17
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:315:in `save!'
18
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/suppressor.rb:48:in `save!'
19
/opt/redmine-4.0.0/app/models/role.rb:124:in `add_permission!'
20
/opt/redmine-4.0.0/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb:3:in `block in up'
21
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
22
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
23
/opt/redmine-4.0.0/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb:3:in `up'
24
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:817:in `exec_migration'
25
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
26
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
27
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:797:in `block in migrate'
28
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
29
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:796:in `migrate'
30
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `migrate'
31
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
32
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1345:in `ddl_transaction'
33
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
34
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
35
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
36
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
37
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
38
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
39
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
40
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1036:in `up'
41
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
42
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
43
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
44
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
45
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
46
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
47
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
48
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
49
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
50
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
51
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
52
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
53
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
54
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
55
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
56
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
57
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
58
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
59
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
60
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
61
/usr/local/rvm/gems/ruby-2.5.3/bin/rake:23:in `load'
62
/usr/local/rvm/gems/ruby-2.5.3/bin/rake:23:in `<main>'
63
/usr/local/rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
64
/usr/local/rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
65

    
66
Caused by:
67
ActiveRecord::RecordInvalid: Validation failed: Name has already been taken
68
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/validations.rb:80:in `raise_validation_error'
69
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/validations.rb:52:in `save!'
70
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:315:in `block in save!'
71
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:387:in `block in with_transaction_returning_status'
72
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `block in transaction'
73
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:239:in `block in within_new_transaction'
74
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
75
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/transaction.rb:236:in `within_new_transaction'
76
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/database_statements.rb:259:in `transaction'
77
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:212:in `transaction'
78
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:385:in `with_transaction_returning_status'
79
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/transactions.rb:315:in `save!'
80
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/suppressor.rb:48:in `save!'
81
/opt/redmine-4.0.0/app/models/role.rb:124:in `add_permission!'
82
/opt/redmine-4.0.0/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb:3:in `block in up'
83
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
84
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/relation/delegation.rb:71:in `each'
85
/opt/redmine-4.0.0/db/migrate/20170418090031_add_view_news_to_all_existing_roles.rb:3:in `up'
86
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:817:in `exec_migration'
87
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:798:in `block (2 levels) in migrate'
88
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/benchmark.rb:293:in `measure'
89
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:797:in `block in migrate'
90
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/connection_adapters/abstract/connection_pool.rb:416:in `with_connection'
91
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:796:in `migrate'
92
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:977:in `migrate'
93
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1292:in `block in execute_migration_in_transaction'
94
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1345:in `ddl_transaction'
95
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1291:in `execute_migration_in_transaction'
96
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1263:in `block in migrate_without_lock'
97
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `each'
98
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1262:in `migrate_without_lock'
99
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `block in migrate'
100
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1363:in `with_advisory_lock'
101
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1210:in `migrate'
102
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1036:in `up'
103
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/migration.rb:1011:in `migrate'
104
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/tasks/database_tasks.rb:172:in `migrate'
105
/usr/local/rvm/gems/ruby-2.5.3/gems/activerecord-5.2.2/lib/active_record/railties/databases.rake:60:in `block (2 levels) in <top (required)>'
106
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `block in execute'
107
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `each'
108
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:273:in `execute'
109
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:214:in `block in invoke_with_call_chain'
110
/usr/local/rvm/rubies/ruby-2.5.3/lib/ruby/2.5.0/monitor.rb:226:in `mon_synchronize'
111
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:194:in `invoke_with_call_chain'
112
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/task.rb:183:in `invoke'
113
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:160:in `invoke_task'
114
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `block (2 levels) in top_level'
115
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `each'
116
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:116:in `block in top_level'
117
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:125:in `run_with_threads'
118
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:110:in `top_level'
119
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:83:in `block in run'
120
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:186:in `standard_exception_handling'
121
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/lib/rake/application.rb:80:in `run'
122
/usr/local/rvm/gems/ruby-2.5.3/gems/rake-12.3.2/exe/rake:27:in `<top (required)>'
123
/usr/local/rvm/gems/ruby-2.5.3/bin/rake:23:in `load'
124
/usr/local/rvm/gems/ruby-2.5.3/bin/rake:23:in `<main>'
125
/usr/local/rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `eval'
126
/usr/local/rvm/gems/ruby-2.5.3/bin/ruby_executable_hooks:24:in `<main>'
127
Tasks: TOP => db:migrate
    (1-1/1)