##// END OF EJS Templates
remove trailing white-spaces from db/migrate/001_setup.rb (#9510)...
Toshi MARUYAMA -
r7626:e6825e7e0ccb
parent child
Show More
@@ -5,22 +5,22
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
19
20 class User < ActiveRecord::Base; end
20 class User < ActiveRecord::Base; end
21 # model removed
21 # model removed
22 class Permission < ActiveRecord::Base; end
22 class Permission < ActiveRecord::Base; end
23
23
24 def self.up
24 def self.up
25 create_table "attachments", :force => true do |t|
25 create_table "attachments", :force => true do |t|
26 t.column "container_id", :integer, :default => 0, :null => false
26 t.column "container_id", :integer, :default => 0, :null => false
@@ -49,7 +49,7 class Setup < ActiveRecord::Migration
49 t.column "attr_mail", :string, :limit => 30
49 t.column "attr_mail", :string, :limit => 30
50 t.column "onthefly_register", :boolean, :default => false, :null => false
50 t.column "onthefly_register", :boolean, :default => false, :null => false
51 end
51 end
52
52
53 create_table "custom_fields", :force => true do |t|
53 create_table "custom_fields", :force => true do |t|
54 t.column "type", :string, :limit => 30, :default => "", :null => false
54 t.column "type", :string, :limit => 30, :default => "", :null => false
55 t.column "name", :string, :limit => 30, :default => "", :null => false
55 t.column "name", :string, :limit => 30, :default => "", :null => false
@@ -61,7 +61,7 class Setup < ActiveRecord::Migration
61 t.column "is_required", :boolean, :default => false, :null => false
61 t.column "is_required", :boolean, :default => false, :null => false
62 t.column "is_for_all", :boolean, :default => false, :null => false
62 t.column "is_for_all", :boolean, :default => false, :null => false
63 end
63 end
64
64
65 create_table "custom_fields_projects", :id => false, :force => true do |t|
65 create_table "custom_fields_projects", :id => false, :force => true do |t|
66 t.column "custom_field_id", :integer, :default => 0, :null => false
66 t.column "custom_field_id", :integer, :default => 0, :null => false
67 t.column "project_id", :integer, :default => 0, :null => false
67 t.column "project_id", :integer, :default => 0, :null => false
@@ -78,7 +78,7 class Setup < ActiveRecord::Migration
78 t.column "custom_field_id", :integer, :default => 0, :null => false
78 t.column "custom_field_id", :integer, :default => 0, :null => false
79 t.column "value", :text
79 t.column "value", :text
80 end
80 end
81
81
82 create_table "documents", :force => true do |t|
82 create_table "documents", :force => true do |t|
83 t.column "project_id", :integer, :default => 0, :null => false
83 t.column "project_id", :integer, :default => 0, :null => false
84 t.column "category_id", :integer, :default => 0, :null => false
84 t.column "category_id", :integer, :default => 0, :null => false
@@ -86,21 +86,21 class Setup < ActiveRecord::Migration
86 t.column "description", :text
86 t.column "description", :text
87 t.column "created_on", :timestamp
87 t.column "created_on", :timestamp
88 end
88 end
89
89
90 add_index "documents", ["project_id"], :name => "documents_project_id"
90 add_index "documents", ["project_id"], :name => "documents_project_id"
91
91
92 create_table "enumerations", :force => true do |t|
92 create_table "enumerations", :force => true do |t|
93 t.column "opt", :string, :limit => 4, :default => "", :null => false
93 t.column "opt", :string, :limit => 4, :default => "", :null => false
94 t.column "name", :string, :limit => 30, :default => "", :null => false
94 t.column "name", :string, :limit => 30, :default => "", :null => false
95 end
95 end
96
96
97 create_table "issue_categories", :force => true do |t|
97 create_table "issue_categories", :force => true do |t|
98 t.column "project_id", :integer, :default => 0, :null => false
98 t.column "project_id", :integer, :default => 0, :null => false
99 t.column "name", :string, :limit => 30, :default => "", :null => false
99 t.column "name", :string, :limit => 30, :default => "", :null => false
100 end
100 end
101
101
102 add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
102 add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
103
103
104 create_table "issue_histories", :force => true do |t|
104 create_table "issue_histories", :force => true do |t|
105 t.column "issue_id", :integer, :default => 0, :null => false
105 t.column "issue_id", :integer, :default => 0, :null => false
106 t.column "status_id", :integer, :default => 0, :null => false
106 t.column "status_id", :integer, :default => 0, :null => false
@@ -108,7 +108,7 class Setup < ActiveRecord::Migration
108 t.column "notes", :text
108 t.column "notes", :text
109 t.column "created_on", :timestamp
109 t.column "created_on", :timestamp
110 end
110 end
111
111
112 add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
112 add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
113
113
114 create_table "issue_statuses", :force => true do |t|
114 create_table "issue_statuses", :force => true do |t|
@@ -117,7 +117,7 class Setup < ActiveRecord::Migration
117 t.column "is_default", :boolean, :default => false, :null => false
117 t.column "is_default", :boolean, :default => false, :null => false
118 t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
118 t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
119 end
119 end
120
120
121 create_table "issues", :force => true do |t|
121 create_table "issues", :force => true do |t|
122 t.column "tracker_id", :integer, :default => 0, :null => false
122 t.column "tracker_id", :integer, :default => 0, :null => false
123 t.column "project_id", :integer, :default => 0, :null => false
123 t.column "project_id", :integer, :default => 0, :null => false
@@ -134,16 +134,16 class Setup < ActiveRecord::Migration
134 t.column "created_on", :timestamp
134 t.column "created_on", :timestamp
135 t.column "updated_on", :timestamp
135 t.column "updated_on", :timestamp
136 end
136 end
137
137
138 add_index "issues", ["project_id"], :name => "issues_project_id"
138 add_index "issues", ["project_id"], :name => "issues_project_id"
139
139
140 create_table "members", :force => true do |t|
140 create_table "members", :force => true do |t|
141 t.column "user_id", :integer, :default => 0, :null => false
141 t.column "user_id", :integer, :default => 0, :null => false
142 t.column "project_id", :integer, :default => 0, :null => false
142 t.column "project_id", :integer, :default => 0, :null => false
143 t.column "role_id", :integer, :default => 0, :null => false
143 t.column "role_id", :integer, :default => 0, :null => false
144 t.column "created_on", :timestamp
144 t.column "created_on", :timestamp
145 end
145 end
146
146
147 create_table "news", :force => true do |t|
147 create_table "news", :force => true do |t|
148 t.column "project_id", :integer
148 t.column "project_id", :integer
149 t.column "title", :string, :limit => 60, :default => "", :null => false
149 t.column "title", :string, :limit => 60, :default => "", :null => false
@@ -152,9 +152,9 class Setup < ActiveRecord::Migration
152 t.column "author_id", :integer, :default => 0, :null => false
152 t.column "author_id", :integer, :default => 0, :null => false
153 t.column "created_on", :timestamp
153 t.column "created_on", :timestamp
154 end
154 end
155
155
156 add_index "news", ["project_id"], :name => "news_project_id"
156 add_index "news", ["project_id"], :name => "news_project_id"
157
157
158 create_table "permissions", :force => true do |t|
158 create_table "permissions", :force => true do |t|
159 t.column "controller", :string, :limit => 30, :default => "", :null => false
159 t.column "controller", :string, :limit => 30, :default => "", :null => false
160 t.column "action", :string, :limit => 30, :default => "", :null => false
160 t.column "action", :string, :limit => 30, :default => "", :null => false
@@ -164,14 +164,14 class Setup < ActiveRecord::Migration
164 t.column "mail_option", :boolean, :default => false, :null => false
164 t.column "mail_option", :boolean, :default => false, :null => false
165 t.column "mail_enabled", :boolean, :default => false, :null => false
165 t.column "mail_enabled", :boolean, :default => false, :null => false
166 end
166 end
167
167
168 create_table "permissions_roles", :id => false, :force => true do |t|
168 create_table "permissions_roles", :id => false, :force => true do |t|
169 t.column "permission_id", :integer, :default => 0, :null => false
169 t.column "permission_id", :integer, :default => 0, :null => false
170 t.column "role_id", :integer, :default => 0, :null => false
170 t.column "role_id", :integer, :default => 0, :null => false
171 end
171 end
172
172
173 add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
173 add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
174
174
175 create_table "projects", :force => true do |t|
175 create_table "projects", :force => true do |t|
176 t.column "name", :string, :limit => 30, :default => "", :null => false
176 t.column "name", :string, :limit => 30, :default => "", :null => false
177 t.column "description", :string, :default => "", :null => false
177 t.column "description", :string, :default => "", :null => false
@@ -182,7 +182,7 class Setup < ActiveRecord::Migration
182 t.column "created_on", :timestamp
182 t.column "created_on", :timestamp
183 t.column "updated_on", :timestamp
183 t.column "updated_on", :timestamp
184 end
184 end
185
185
186 create_table "roles", :force => true do |t|
186 create_table "roles", :force => true do |t|
187 t.column "name", :string, :limit => 30, :default => "", :null => false
187 t.column "name", :string, :limit => 30, :default => "", :null => false
188 end
188 end
@@ -193,12 +193,12 class Setup < ActiveRecord::Migration
193 t.column "value", :string, :limit => 40, :default => "", :null => false
193 t.column "value", :string, :limit => 40, :default => "", :null => false
194 t.column "created_on", :datetime, :null => false
194 t.column "created_on", :datetime, :null => false
195 end
195 end
196
196
197 create_table "trackers", :force => true do |t|
197 create_table "trackers", :force => true do |t|
198 t.column "name", :string, :limit => 30, :default => "", :null => false
198 t.column "name", :string, :limit => 30, :default => "", :null => false
199 t.column "is_in_chlog", :boolean, :default => false, :null => false
199 t.column "is_in_chlog", :boolean, :default => false, :null => false
200 end
200 end
201
201
202 create_table "users", :force => true do |t|
202 create_table "users", :force => true do |t|
203 t.column "login", :string, :limit => 30, :default => "", :null => false
203 t.column "login", :string, :limit => 30, :default => "", :null => false
204 t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
204 t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
@@ -214,7 +214,7 class Setup < ActiveRecord::Migration
214 t.column "created_on", :timestamp
214 t.column "created_on", :timestamp
215 t.column "updated_on", :timestamp
215 t.column "updated_on", :timestamp
216 end
216 end
217
217
218 create_table "versions", :force => true do |t|
218 create_table "versions", :force => true do |t|
219 t.column "project_id", :integer, :default => 0, :null => false
219 t.column "project_id", :integer, :default => 0, :null => false
220 t.column "name", :string, :limit => 30, :default => "", :null => false
220 t.column "name", :string, :limit => 30, :default => "", :null => false
@@ -223,16 +223,16 class Setup < ActiveRecord::Migration
223 t.column "created_on", :timestamp
223 t.column "created_on", :timestamp
224 t.column "updated_on", :timestamp
224 t.column "updated_on", :timestamp
225 end
225 end
226
226
227 add_index "versions", ["project_id"], :name => "versions_project_id"
227 add_index "versions", ["project_id"], :name => "versions_project_id"
228
228
229 create_table "workflows", :force => true do |t|
229 create_table "workflows", :force => true do |t|
230 t.column "tracker_id", :integer, :default => 0, :null => false
230 t.column "tracker_id", :integer, :default => 0, :null => false
231 t.column "old_status_id", :integer, :default => 0, :null => false
231 t.column "old_status_id", :integer, :default => 0, :null => false
232 t.column "new_status_id", :integer, :default => 0, :null => false
232 t.column "new_status_id", :integer, :default => 0, :null => false
233 t.column "role_id", :integer, :default => 0, :null => false
233 t.column "role_id", :integer, :default => 0, :null => false
234 end
234 end
235
235
236 # project
236 # project
237 Permission.create :controller => "projects", :action => "show", :description => "label_overview", :sort => 100, :is_public => true
237 Permission.create :controller => "projects", :action => "show", :description => "label_overview", :sort => 100, :is_public => true
238 Permission.create :controller => "projects", :action => "changelog", :description => "label_change_log", :sort => 105, :is_public => true
238 Permission.create :controller => "projects", :action => "changelog", :description => "label_change_log", :sort => 105, :is_public => true
@@ -283,7 +283,7 class Setup < ActiveRecord::Migration
283 Permission.create :controller => "versions", :action => "download", :description => "button_download", :sort => 1301, :is_public => true
283 Permission.create :controller => "versions", :action => "download", :description => "button_download", :sort => 1301, :is_public => true
284 Permission.create :controller => "projects", :action => "add_file", :description => "button_add", :sort => 1320
284 Permission.create :controller => "projects", :action => "add_file", :description => "button_add", :sort => 1320
285 Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
285 Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
286
286
287 # create default administrator account
287 # create default administrator account
288 user = User.create :login => "admin",
288 user = User.create :login => "admin",
289 :hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
289 :hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
General Comments 0
You need to be logged in to leave comments. Login now