@@ -1,275 +1,307 | |||||
1 | # redMine - project management software |
|
1 | # redMine - project management software | |
2 | # Copyright (C) 2006 Jean-Philippe Lang |
|
2 | # Copyright (C) 2006 Jean-Philippe Lang | |
3 | # |
|
3 | # | |
4 | # This program is free software; you can redistribute it and/or |
|
4 | # This program is free software; you can redistribute it and/or | |
5 | # modify it under the terms of the GNU General Public License |
|
5 | # modify it under the terms of the GNU General Public License | |
6 | # as published by the Free Software Foundation; either version 2 |
|
6 | # as published by the Free Software Foundation; either version 2 | |
7 | # of the License, or (at your option) any later version. |
|
7 | # of the License, or (at your option) any later version. | |
8 | # |
|
8 | # | |
9 | # This program is distributed in the hope that it will be useful, |
|
9 | # This program is distributed in the hope that it will be useful, | |
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|
10 | # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|
11 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 | # GNU General Public License for more details. |
|
12 | # GNU General Public License for more details. | |
13 | # |
|
13 | # | |
14 | # You should have received a copy of the GNU General Public License |
|
14 | # You should have received a copy of the GNU General Public License | |
15 | # along with this program; if not, write to the Free Software |
|
15 | # along with this program; if not, write to the Free Software | |
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. |
|
16 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. | |
17 |
|
17 | |||
18 | class Setup < ActiveRecord::Migration |
|
18 | class Setup < ActiveRecord::Migration | |
19 | def self.up |
|
19 | def self.up | |
20 | create_table "attachments", :force => true do |t| |
|
20 | create_table "attachments", :force => true do |t| | |
21 | t.column "container_id", :integer, :default => 0, :null => false |
|
21 | t.column "container_id", :integer, :default => 0, :null => false | |
22 | t.column "container_type", :string, :limit => 30, :default => "", :null => false |
|
22 | t.column "container_type", :string, :limit => 30, :default => "", :null => false | |
23 | t.column "filename", :string, :default => "", :null => false |
|
23 | t.column "filename", :string, :default => "", :null => false | |
24 | t.column "disk_filename", :string, :default => "", :null => false |
|
24 | t.column "disk_filename", :string, :default => "", :null => false | |
25 | t.column "filesize", :integer, :default => 0, :null => false |
|
25 | t.column "filesize", :integer, :default => 0, :null => false | |
26 | t.column "content_type", :string, :limit => 60, :default => "" |
|
26 | t.column "content_type", :string, :limit => 60, :default => "" | |
27 | t.column "digest", :string, :limit => 40, :default => "", :null => false |
|
27 | t.column "digest", :string, :limit => 40, :default => "", :null => false | |
28 | t.column "downloads", :integer, :default => 0, :null => false |
|
28 | t.column "downloads", :integer, :default => 0, :null => false | |
29 | t.column "author_id", :integer, :default => 0, :null => false |
|
29 | t.column "author_id", :integer, :default => 0, :null => false | |
30 | t.column "created_on", :timestamp |
|
30 | t.column "created_on", :timestamp | |
31 | end |
|
31 | end | |
32 |
|
32 | |||
33 |
create_table " |
|
33 | create_table "auth_sources", :force => true do |t| | |
|
34 | t.column "type", :string, :limit => 30, :default => "", :null => false | |||
|
35 | t.column "name", :string, :limit => 60, :default => "", :null => false | |||
|
36 | t.column "host", :string, :limit => 60 | |||
|
37 | t.column "port", :integer | |||
|
38 | t.column "account", :string, :limit => 60 | |||
|
39 | t.column "account_password", :string, :limit => 60 | |||
|
40 | t.column "base_dn", :string, :limit => 255 | |||
|
41 | t.column "attr_login", :string, :limit => 30 | |||
|
42 | t.column "attr_firstname", :string, :limit => 30 | |||
|
43 | t.column "attr_lastname", :string, :limit => 30 | |||
|
44 | t.column "attr_mail", :string, :limit => 30 | |||
|
45 | t.column "onthefly_register", :boolean, :default => false, :null => false | |||
|
46 | end | |||
|
47 | ||||
|
48 | create_table "custom_fields", :force => true do |t| | |||
|
49 | t.column "type", :string, :limit => 30, :default => "", :null => false | |||
34 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
50 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
35 |
t.column "t |
|
51 | t.column "field_format", :string, :limit => 30, :default => "", :null => false | |
36 | t.column "is_required", :boolean, :default => false, :null => false |
|
|||
37 | t.column "is_for_all", :boolean, :default => false, :null => false |
|
|||
38 | t.column "possible_values", :text, :default => "" |
|
52 | t.column "possible_values", :text, :default => "" | |
39 | t.column "regexp", :string, :default => "" |
|
53 | t.column "regexp", :string, :default => "" | |
40 | t.column "min_length", :integer, :default => 0, :null => false |
|
54 | t.column "min_length", :integer, :default => 0, :null => false | |
41 | t.column "max_length", :integer, :default => 0, :null => false |
|
55 | t.column "max_length", :integer, :default => 0, :null => false | |
|
56 | t.column "is_required", :boolean, :default => false, :null => false | |||
|
57 | t.column "is_for_all", :boolean, :default => false, :null => false | |||
42 | end |
|
58 | end | |
43 |
|
59 | |||
44 | create_table "custom_fields_projects", :id => false, :force => true do |t| |
|
60 | create_table "custom_fields_projects", :id => false, :force => true do |t| | |
45 | t.column "custom_field_id", :integer, :default => 0, :null => false |
|
61 | t.column "custom_field_id", :integer, :default => 0, :null => false | |
46 | t.column "project_id", :integer, :default => 0, :null => false |
|
62 | t.column "project_id", :integer, :default => 0, :null => false | |
47 | end |
|
63 | end | |
48 |
|
64 | |||
|
65 | create_table "custom_fields_trackers", :id => false, :force => true do |t| | |||
|
66 | t.column "custom_field_id", :integer, :default => 0, :null => false | |||
|
67 | t.column "tracker_id", :integer, :default => 0, :null => false | |||
|
68 | end | |||
|
69 | ||||
49 | create_table "custom_values", :force => true do |t| |
|
70 | create_table "custom_values", :force => true do |t| | |
50 |
t.column " |
|
71 | t.column "customized_type", :string, :limit => 30, :default => "", :null => false | |
|
72 | t.column "customized_id", :integer, :default => 0, :null => false | |||
51 | t.column "custom_field_id", :integer, :default => 0, :null => false |
|
73 | t.column "custom_field_id", :integer, :default => 0, :null => false | |
52 | t.column "value", :text, :default => "", :null => false |
|
74 | t.column "value", :text, :default => "", :null => false | |
53 | end |
|
75 | end | |
54 |
|
76 | |||
55 | add_index "custom_values", ["issue_id"], :name => "custom_values_issue_id" |
|
|||
56 |
|
||||
57 | create_table "documents", :force => true do |t| |
|
77 | create_table "documents", :force => true do |t| | |
58 | t.column "project_id", :integer, :default => 0, :null => false |
|
78 | t.column "project_id", :integer, :default => 0, :null => false | |
59 | t.column "category_id", :integer, :default => 0, :null => false |
|
79 | t.column "category_id", :integer, :default => 0, :null => false | |
60 | t.column "title", :string, :limit => 60, :default => "", :null => false |
|
80 | t.column "title", :string, :limit => 60, :default => "", :null => false | |
61 | t.column "descr", :text, :default => "", :null => false |
|
81 | t.column "description", :text, :default => "", :null => false | |
62 | t.column "created_on", :timestamp |
|
82 | t.column "created_on", :timestamp | |
63 | end |
|
83 | end | |
64 |
|
84 | |||
65 | create_table "enumerations", :force => true do |t| |
|
85 | create_table "enumerations", :force => true do |t| | |
66 | t.column "opt", :string, :limit => 4, :default => "", :null => false |
|
86 | t.column "opt", :string, :limit => 4, :default => "", :null => false | |
67 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
87 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
68 | end |
|
88 | end | |
69 |
|
89 | |||
70 | create_table "issue_categories", :force => true do |t| |
|
90 | create_table "issue_categories", :force => true do |t| | |
71 | t.column "project_id", :integer, :default => 0, :null => false |
|
91 | t.column "project_id", :integer, :default => 0, :null => false | |
72 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
92 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
73 | end |
|
93 | end | |
74 |
|
94 | |||
75 | create_table "issue_histories", :force => true do |t| |
|
95 | create_table "issue_histories", :force => true do |t| | |
76 | t.column "issue_id", :integer, :default => 0, :null => false |
|
96 | t.column "issue_id", :integer, :default => 0, :null => false | |
77 | t.column "status_id", :integer, :default => 0, :null => false |
|
97 | t.column "status_id", :integer, :default => 0, :null => false | |
78 | t.column "author_id", :integer, :default => 0, :null => false |
|
98 | t.column "author_id", :integer, :default => 0, :null => false | |
79 | t.column "notes", :text, :default => "" |
|
99 | t.column "notes", :text, :default => "" | |
80 | t.column "created_on", :timestamp |
|
100 | t.column "created_on", :timestamp | |
81 | end |
|
101 | end | |
82 |
|
102 | |||
83 | add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id" |
|
103 | add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id" | |
84 |
|
104 | |||
85 | create_table "issue_statuses", :force => true do |t| |
|
105 | create_table "issue_statuses", :force => true do |t| | |
86 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
106 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
87 | t.column "is_closed", :boolean, :default => false, :null => false |
|
107 | t.column "is_closed", :boolean, :default => false, :null => false | |
88 | t.column "is_default", :boolean, :default => false, :null => false |
|
108 | t.column "is_default", :boolean, :default => false, :null => false | |
89 | t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false |
|
109 | t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false | |
90 | end |
|
110 | end | |
91 |
|
111 | |||
92 | create_table "issues", :force => true do |t| |
|
112 | create_table "issues", :force => true do |t| | |
93 | t.column "tracker_id", :integer, :default => 0, :null => false |
|
113 | t.column "tracker_id", :integer, :default => 0, :null => false | |
94 | t.column "project_id", :integer, :default => 0, :null => false |
|
114 | t.column "project_id", :integer, :default => 0, :null => false | |
95 | t.column "subject", :string, :default => "", :null => false |
|
115 | t.column "subject", :string, :default => "", :null => false | |
96 | t.column "descr", :text, :default => "", :null => false |
|
116 | t.column "description", :text, :default => "", :null => false | |
97 | t.column "category_id", :integer |
|
117 | t.column "category_id", :integer | |
98 | t.column "status_id", :integer, :default => 0, :null => false |
|
118 | t.column "status_id", :integer, :default => 0, :null => false | |
99 | t.column "assigned_to_id", :integer |
|
119 | t.column "assigned_to_id", :integer | |
100 | t.column "priority_id", :integer, :default => 0, :null => false |
|
120 | t.column "priority_id", :integer, :default => 0, :null => false | |
101 | t.column "fixed_version_id", :integer |
|
121 | t.column "fixed_version_id", :integer | |
102 | t.column "author_id", :integer, :default => 0, :null => false |
|
122 | t.column "author_id", :integer, :default => 0, :null => false | |
103 | t.column "created_on", :timestamp |
|
123 | t.column "created_on", :timestamp | |
104 | t.column "updated_on", :timestamp |
|
124 | t.column "updated_on", :timestamp | |
105 | end |
|
125 | end | |
106 |
|
126 | |||
107 | add_index "issues", ["project_id"], :name => "issues_project_id" |
|
127 | add_index "issues", ["project_id"], :name => "issues_project_id" | |
108 |
|
128 | |||
109 | create_table "members", :force => true do |t| |
|
129 | create_table "members", :force => true do |t| | |
110 | t.column "user_id", :integer, :default => 0, :null => false |
|
130 | t.column "user_id", :integer, :default => 0, :null => false | |
111 | t.column "project_id", :integer, :default => 0, :null => false |
|
131 | t.column "project_id", :integer, :default => 0, :null => false | |
112 | t.column "role_id", :integer, :default => 0, :null => false |
|
132 | t.column "role_id", :integer, :default => 0, :null => false | |
113 | t.column "created_on", :timestamp |
|
133 | t.column "created_on", :timestamp | |
114 | end |
|
134 | end | |
115 |
|
135 | |||
116 | create_table "news", :force => true do |t| |
|
136 | create_table "news", :force => true do |t| | |
117 | t.column "project_id", :integer |
|
137 | t.column "project_id", :integer | |
118 | t.column "title", :string, :limit => 60, :default => "", :null => false |
|
138 | t.column "title", :string, :limit => 60, :default => "", :null => false | |
119 |
t.column "s |
|
139 | t.column "summary", :string, :limit => 255, :default => "" | |
120 | t.column "descr", :text, :default => "", :null => false |
|
140 | t.column "description", :text, :default => "", :null => false | |
121 | t.column "author_id", :integer, :default => 0, :null => false |
|
141 | t.column "author_id", :integer, :default => 0, :null => false | |
122 | t.column "created_on", :timestamp |
|
142 | t.column "created_on", :timestamp | |
123 | end |
|
143 | end | |
124 |
|
144 | |||
125 | create_table "permissions", :force => true do |t| |
|
145 | create_table "permissions", :force => true do |t| | |
126 | t.column "controller", :string, :limit => 30, :default => "", :null => false |
|
146 | t.column "controller", :string, :limit => 30, :default => "", :null => false | |
127 | t.column "action", :string, :limit => 30, :default => "", :null => false |
|
147 | t.column "action", :string, :limit => 30, :default => "", :null => false | |
128 | t.column "descr", :string, :limit => 60, :default => "", :null => false |
|
148 | t.column "description", :string, :limit => 60, :default => "", :null => false | |
129 | t.column "is_public", :boolean, :default => false, :null => false |
|
149 | t.column "is_public", :boolean, :default => false, :null => false | |
130 | t.column "sort", :integer, :default => 0, :null => false |
|
150 | t.column "sort", :integer, :default => 0, :null => false | |
131 | t.column "mail_option", :boolean, :default => false, :null => false |
|
151 | t.column "mail_option", :boolean, :default => false, :null => false | |
132 | t.column "mail_enabled", :boolean, :default => false, :null => false |
|
152 | t.column "mail_enabled", :boolean, :default => false, :null => false | |
133 | end |
|
153 | end | |
134 |
|
154 | |||
135 | create_table "permissions_roles", :id => false, :force => true do |t| |
|
155 | create_table "permissions_roles", :id => false, :force => true do |t| | |
136 | t.column "permission_id", :integer, :default => 0, :null => false |
|
156 | t.column "permission_id", :integer, :default => 0, :null => false | |
137 | t.column "role_id", :integer, :default => 0, :null => false |
|
157 | t.column "role_id", :integer, :default => 0, :null => false | |
138 | end |
|
158 | end | |
139 |
|
159 | |||
140 | add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" |
|
160 | add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id" | |
141 |
|
161 | |||
142 | create_table "projects", :force => true do |t| |
|
162 | create_table "projects", :force => true do |t| | |
143 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
163 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
144 | t.column "descr", :string, :default => "", :null => false |
|
164 | t.column "description", :string, :default => "", :null => false | |
145 | t.column "homepage", :string, :limit => 60, :default => "" |
|
165 | t.column "homepage", :string, :limit => 60, :default => "" | |
146 | t.column "is_public", :boolean, :default => true, :null => false |
|
166 | t.column "is_public", :boolean, :default => true, :null => false | |
147 | t.column "parent_id", :integer |
|
167 | t.column "parent_id", :integer | |
148 | t.column "projects_count", :integer, :default => 0 |
|
168 | t.column "projects_count", :integer, :default => 0 | |
149 | t.column "created_on", :timestamp |
|
169 | t.column "created_on", :timestamp | |
150 | t.column "updated_on", :timestamp |
|
170 | t.column "updated_on", :timestamp | |
151 | end |
|
171 | end | |
152 |
|
172 | |||
153 | create_table "roles", :force => true do |t| |
|
173 | create_table "roles", :force => true do |t| | |
154 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
174 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
155 | end |
|
175 | end | |
|
176 | ||||
|
177 | create_table "tokens", :force => true do |t| | |||
|
178 | t.column "user_id", :integer, :default => 0, :null => false | |||
|
179 | t.column "action", :string, :limit => 30, :default => "", :null => false | |||
|
180 | t.column "value", :string, :limit => 40, :default => "", :null => false | |||
|
181 | t.column "created_on", :datetime, :null => false | |||
|
182 | end | |||
156 |
|
183 | |||
157 | create_table "trackers", :force => true do |t| |
|
184 | create_table "trackers", :force => true do |t| | |
158 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
185 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
159 | t.column "is_in_chlog", :boolean, :default => false, :null => false |
|
186 | t.column "is_in_chlog", :boolean, :default => false, :null => false | |
160 | end |
|
187 | end | |
161 |
|
188 | |||
162 | create_table "users", :force => true do |t| |
|
189 | create_table "users", :force => true do |t| | |
163 | t.column "login", :string, :limit => 30, :default => "", :null => false |
|
190 | t.column "login", :string, :limit => 30, :default => "", :null => false | |
164 | t.column "hashed_password", :string, :limit => 40, :default => "", :null => false |
|
191 | t.column "hashed_password", :string, :limit => 40, :default => "", :null => false | |
165 | t.column "firstname", :string, :limit => 30, :default => "", :null => false |
|
192 | t.column "firstname", :string, :limit => 30, :default => "", :null => false | |
166 | t.column "lastname", :string, :limit => 30, :default => "", :null => false |
|
193 | t.column "lastname", :string, :limit => 30, :default => "", :null => false | |
167 | t.column "mail", :string, :limit => 60, :default => "", :null => false |
|
194 | t.column "mail", :string, :limit => 60, :default => "", :null => false | |
168 | t.column "mail_notification", :boolean, :default => true, :null => false |
|
195 | t.column "mail_notification", :boolean, :default => true, :null => false | |
169 | t.column "admin", :boolean, :default => false, :null => false |
|
196 | t.column "admin", :boolean, :default => false, :null => false | |
170 |
t.column " |
|
197 | t.column "status", :integer, :default => 1, :null => false | |
171 | t.column "last_login_on", :datetime |
|
198 | t.column "last_login_on", :datetime | |
172 |
t.column "language", :string, :limit => 2, :default => "" |
|
199 | t.column "language", :string, :limit => 2, :default => "" | |
|
200 | t.column "auth_source_id", :integer | |||
173 | t.column "created_on", :timestamp |
|
201 | t.column "created_on", :timestamp | |
174 | t.column "updated_on", :timestamp |
|
202 | t.column "updated_on", :timestamp | |
175 | end |
|
203 | end | |
176 |
|
204 | |||
177 | create_table "versions", :force => true do |t| |
|
205 | create_table "versions", :force => true do |t| | |
178 | t.column "project_id", :integer, :default => 0, :null => false |
|
206 | t.column "project_id", :integer, :default => 0, :null => false | |
179 | t.column "name", :string, :limit => 30, :default => "", :null => false |
|
207 | t.column "name", :string, :limit => 30, :default => "", :null => false | |
180 | t.column "descr", :string, :default => "" |
|
208 | t.column "description", :string, :default => "" | |
181 | t.column "effective_date", :date, :null => false |
|
209 | t.column "effective_date", :date, :null => false | |
182 | t.column "created_on", :timestamp |
|
210 | t.column "created_on", :timestamp | |
183 | t.column "updated_on", :timestamp |
|
211 | t.column "updated_on", :timestamp | |
184 | end |
|
212 | end | |
185 |
|
213 | |||
186 | create_table "workflows", :force => true do |t| |
|
214 | create_table "workflows", :force => true do |t| | |
187 | t.column "tracker_id", :integer, :default => 0, :null => false |
|
215 | t.column "tracker_id", :integer, :default => 0, :null => false | |
188 | t.column "old_status_id", :integer, :default => 0, :null => false |
|
216 | t.column "old_status_id", :integer, :default => 0, :null => false | |
189 | t.column "new_status_id", :integer, :default => 0, :null => false |
|
217 | t.column "new_status_id", :integer, :default => 0, :null => false | |
190 | t.column "role_id", :integer, :default => 0, :null => false |
|
218 | t.column "role_id", :integer, :default => 0, :null => false | |
191 | end |
|
219 | end | |
192 |
|
220 | |||
193 | # project |
|
221 | # project | |
194 | Permission.create :controller => "projects", :action => "show", :descr => "Overview", :sort => 100, :is_public => true |
|
222 | Permission.create :controller => "projects", :action => "show", :description => "Overview", :sort => 100, :is_public => true | |
195 | Permission.create :controller => "projects", :action => "changelog", :descr => "View change log", :sort => 105, :is_public => true |
|
223 | Permission.create :controller => "projects", :action => "changelog", :description => "View change log", :sort => 105, :is_public => true | |
196 | Permission.create :controller => "reports", :action => "issue_report", :descr => "View reports", :sort => 110, :is_public => true |
|
224 | Permission.create :controller => "reports", :action => "issue_report", :description => "View reports", :sort => 110, :is_public => true | |
197 | Permission.create :controller => "projects", :action => "settings", :descr => "Settings", :sort => 150 |
|
225 | Permission.create :controller => "projects", :action => "settings", :description => "Settings", :sort => 150 | |
198 | Permission.create :controller => "projects", :action => "edit", :descr => "Edit", :sort => 151 |
|
226 | Permission.create :controller => "projects", :action => "edit", :description => "Edit", :sort => 151 | |
199 | # members |
|
227 | # members | |
200 | Permission.create :controller => "projects", :action => "list_members", :descr => "View list", :sort => 200, :is_public => true |
|
228 | Permission.create :controller => "projects", :action => "list_members", :description => "View list", :sort => 200, :is_public => true | |
201 | Permission.create :controller => "projects", :action => "add_member", :descr => "New member", :sort => 220 |
|
229 | Permission.create :controller => "projects", :action => "add_member", :description => "New member", :sort => 220 | |
202 | Permission.create :controller => "members", :action => "edit", :descr => "Edit", :sort => 221 |
|
230 | Permission.create :controller => "members", :action => "edit", :description => "Edit", :sort => 221 | |
203 | Permission.create :controller => "members", :action => "destroy", :descr => "Delete", :sort => 222 |
|
231 | Permission.create :controller => "members", :action => "destroy", :description => "Delete", :sort => 222 | |
204 | # versions |
|
232 | # versions | |
205 | Permission.create :controller => "projects", :action => "add_version", :descr => "New version", :sort => 320 |
|
233 | Permission.create :controller => "projects", :action => "add_version", :description => "New version", :sort => 320 | |
206 | Permission.create :controller => "versions", :action => "edit", :descr => "Edit", :sort => 321 |
|
234 | Permission.create :controller => "versions", :action => "edit", :description => "Edit", :sort => 321 | |
207 | Permission.create :controller => "versions", :action => "destroy", :descr => "Delete", :sort => 322 |
|
235 | Permission.create :controller => "versions", :action => "destroy", :description => "Delete", :sort => 322 | |
208 | # issue categories |
|
236 | # issue categories | |
209 | Permission.create :controller => "projects", :action => "add_issue_category", :descr => "New issue category", :sort => 420 |
|
237 | Permission.create :controller => "projects", :action => "add_issue_category", :description => "New issue category", :sort => 420 | |
210 | Permission.create :controller => "issue_categories", :action => "edit", :descr => "Edit", :sort => 421 |
|
238 | Permission.create :controller => "issue_categories", :action => "edit", :description => "Edit", :sort => 421 | |
211 | Permission.create :controller => "issue_categories", :action => "destroy", :descr => "Delete", :sort => 422 |
|
239 | Permission.create :controller => "issue_categories", :action => "destroy", :description => "Delete", :sort => 422 | |
212 | # issues |
|
240 | # issues | |
213 | Permission.create :controller => "projects", :action => "list_issues", :descr => "View list", :sort => 1000, :is_public => true |
|
241 | Permission.create :controller => "projects", :action => "list_issues", :description => "View list", :sort => 1000, :is_public => true | |
214 |
Permission.create :controller => " |
|
242 | Permission.create :controller => "projects", :action => "export_issues_csv", :description => "Export list to CSV", :sort => 1001, :is_public => true | |
215 |
Permission.create :controller => "issues", :action => " |
|
243 | Permission.create :controller => "issues", :action => "show", :description => "View", :sort => 1005, :is_public => true | |
216 |
Permission.create :controller => " |
|
244 | Permission.create :controller => "issues", :action => "download", :description => "Download file", :sort => 1010, :is_public => true | |
217 |
Permission.create :controller => " |
|
245 | Permission.create :controller => "projects", :action => "add_issue", :description => "Report an issue", :sort => 1050, :mail_option => 1, :mail_enabled => 1 | |
218 |
Permission.create :controller => "issues", :action => " |
|
246 | Permission.create :controller => "issues", :action => "edit", :description => "Edit", :sort => 1055 | |
219 |
Permission.create :controller => "issues", :action => " |
|
247 | Permission.create :controller => "issues", :action => "change_status", :description => "Change status", :sort => 1060, :mail_option => 1, :mail_enabled => 1 | |
220 |
Permission.create :controller => "issues", :action => " |
|
248 | Permission.create :controller => "issues", :action => "destroy", :description => "Delete", :sort => 1065 | |
221 |
Permission.create :controller => "issues", :action => " |
|
249 | Permission.create :controller => "issues", :action => "add_attachment", :description => "Add file", :sort => 1070 | |
|
250 | Permission.create :controller => "issues", :action => "destroy_attachment", :description => "Delete file", :sort => 1075 | |||
222 | # news |
|
251 | # news | |
223 | Permission.create :controller => "projects", :action => "list_news", :descr => "View list", :sort => 1100, :is_public => true |
|
252 | Permission.create :controller => "projects", :action => "list_news", :description => "View list", :sort => 1100, :is_public => true | |
224 | Permission.create :controller => "news", :action => "show", :descr => "View", :sort => 1101, :is_public => true |
|
253 | Permission.create :controller => "news", :action => "show", :description => "View", :sort => 1101, :is_public => true | |
225 | Permission.create :controller => "projects", :action => "add_news", :descr => "Add", :sort => 1120 |
|
254 | Permission.create :controller => "projects", :action => "add_news", :description => "Add", :sort => 1120 | |
226 | Permission.create :controller => "news", :action => "edit", :descr => "Edit", :sort => 1121 |
|
255 | Permission.create :controller => "news", :action => "edit", :description => "Edit", :sort => 1121 | |
227 | Permission.create :controller => "news", :action => "destroy", :descr => "Delete", :sort => 1122 |
|
256 | Permission.create :controller => "news", :action => "destroy", :description => "Delete", :sort => 1122 | |
228 | # documents |
|
257 | # documents | |
229 | Permission.create :controller => "projects", :action => "list_documents", :descr => "View list", :sort => 1200, :is_public => true |
|
258 | Permission.create :controller => "projects", :action => "list_documents", :description => "View list", :sort => 1200, :is_public => true | |
230 | Permission.create :controller => "documents", :action => "show", :descr => "View", :sort => 1201, :is_public => true |
|
259 | Permission.create :controller => "documents", :action => "show", :description => "View", :sort => 1201, :is_public => true | |
231 | Permission.create :controller => "documents", :action => "download", :descr => "Download", :sort => 1202, :is_public => true |
|
260 | Permission.create :controller => "documents", :action => "download", :description => "Download", :sort => 1202, :is_public => true | |
232 | Permission.create :controller => "projects", :action => "add_document", :descr => "Add", :sort => 1220 |
|
261 | Permission.create :controller => "projects", :action => "add_document", :description => "Add", :sort => 1220 | |
233 | Permission.create :controller => "documents", :action => "edit", :descr => "Edit", :sort => 1221 |
|
262 | Permission.create :controller => "documents", :action => "edit", :description => "Edit", :sort => 1221 | |
234 | Permission.create :controller => "documents", :action => "destroy", :descr => "Delete", :sort => 1222 |
|
263 | Permission.create :controller => "documents", :action => "destroy", :description => "Delete", :sort => 1222 | |
235 | Permission.create :controller => "documents", :action => "add_attachment", :descr => "Add file", :sort => 1223 |
|
264 | Permission.create :controller => "documents", :action => "add_attachment", :description => "Add file", :sort => 1223 | |
236 | Permission.create :controller => "documents", :action => "destroy_attachment", :descr => "Delete file", :sort => 1224 |
|
265 | Permission.create :controller => "documents", :action => "destroy_attachment", :description => "Delete file", :sort => 1224 | |
237 | # files |
|
266 | # files | |
238 | Permission.create :controller => "projects", :action => "list_files", :descr => "View list", :sort => 1300, :is_public => true |
|
267 | Permission.create :controller => "projects", :action => "list_files", :description => "View list", :sort => 1300, :is_public => true | |
239 | Permission.create :controller => "versions", :action => "download", :descr => "Download", :sort => 1301, :is_public => true |
|
268 | Permission.create :controller => "versions", :action => "download", :description => "Download", :sort => 1301, :is_public => true | |
240 | Permission.create :controller => "projects", :action => "add_file", :descr => "Add", :sort => 1320 |
|
269 | Permission.create :controller => "projects", :action => "add_file", :description => "Add", :sort => 1320 | |
241 | Permission.create :controller => "versions", :action => "destroy_file", :descr => "Delete", :sort => 1322 |
|
270 | Permission.create :controller => "versions", :action => "destroy_file", :description => "Delete", :sort => 1322 | |
242 |
|
271 | |||
243 | # create default administrator account |
|
272 | # create default administrator account | |
244 | user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en" |
|
273 | user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en" | |
245 | user.login = "admin" |
|
274 | user.login = "admin" | |
246 | user.password = "admin" |
|
275 | user.password = "admin" | |
247 | user.admin = true |
|
276 | user.admin = true | |
248 | user.save |
|
277 | user.save | |
249 |
|
278 | |||
250 |
|
279 | |||
251 | end |
|
280 | end | |
252 |
|
281 | |||
253 | def self.down |
|
282 | def self.down | |
254 | drop_table :attachments |
|
283 | drop_table :attachments | |
|
284 | drop_table :auth_sources | |||
255 | drop_table :custom_fields |
|
285 | drop_table :custom_fields | |
256 | drop_table :custom_fields_projects |
|
286 | drop_table :custom_fields_projects | |
|
287 | drop_table :custom_fields_trackers | |||
257 | drop_table :custom_values |
|
288 | drop_table :custom_values | |
258 | drop_table :documents |
|
289 | drop_table :documents | |
259 | drop_table :enumerations |
|
290 | drop_table :enumerations | |
260 | drop_table :issue_categories |
|
291 | drop_table :issue_categories | |
261 | drop_table :issue_histories |
|
292 | drop_table :issue_histories | |
262 | drop_table :issue_statuses |
|
293 | drop_table :issue_statuses | |
263 | drop_table :issues |
|
294 | drop_table :issues | |
264 | drop_table :members |
|
295 | drop_table :members | |
265 | drop_table :news |
|
296 | drop_table :news | |
266 | drop_table :permissions |
|
297 | drop_table :permissions | |
267 | drop_table :permissions_roles |
|
298 | drop_table :permissions_roles | |
268 | drop_table :projects |
|
299 | drop_table :projects | |
269 | drop_table :roles |
|
300 | drop_table :roles | |
270 | drop_table :trackers |
|
301 | drop_table :trackers | |
|
302 | drop_table :tokens | |||
271 | drop_table :users |
|
303 | drop_table :users | |
272 | drop_table :versions |
|
304 | drop_table :versions | |
273 | drop_table :workflows |
|
305 | drop_table :workflows | |
274 | end |
|
306 | end | |
275 | end |
|
307 | end |
General Comments 0
You need to be logged in to leave comments.
Login now