| CODENOTIFIER | HelpYou are not signed inSign in |
Project: Redmine
Revision: 11
Author: jplang
Date: 29 Jul 2006 13:30:20
Changes:Diff:| ... | ...@@ -29,36 +29,56 @@ | |
| 29 | 29 | t.column "author_id", :integer, :default => 0, :null => false |
| 30 | 30 | t.column "created_on", :timestamp |
| 31 | 31 | end |
| 32 | ||
| 33 | create_table "custom_fields", :force => true do |t| | |
| 32 | ||
| 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 | 50 | t.column "name", :string, :limit => 30, :default => "", :null => false |
| 35 | t.column "typ", :integer, :default => 0, :null => false | |
| 36 | t.column "is_required", :boolean, :default => false, :null => false | |
| 37 | t.column "is_for_all", :boolean, :default => false, :null => false | |
| 51 | t.column "field_format", :string, :limit => 30, :default => "", :null => false | |
| 38 | 52 | t.column "possible_values", :text, :default => "" |
| 39 | 53 | t.column "regexp", :string, :default => "" |
| 40 | 54 | t.column "min_length", :integer, :default => 0, :null => false |
| 41 | 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 | 58 | end |
| 43 | 59 | |
| 44 | 60 | create_table "custom_fields_projects", :id => false, :force => true do |t| |
| 45 | 61 | t.column "custom_field_id", :integer, :default => 0, :null => false |
| 46 | 62 | t.column "project_id", :integer, :default => 0, :null => false |
| 47 | 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 | 70 | create_table "custom_values", :force => true do |t| |
| 50 | t.column "issue_id", :integer, :default => 0, :null => false | |
| 71 | t.column "customized_type", :string, :limit => 30, :default => "", :null => false | |
| 72 | t.column "customized_id", :integer, :default => 0, :null => false | |
| 51 | 73 | t.column "custom_field_id", :integer, :default => 0, :null => false |
| 52 | 74 | t.column "value", :text, :default => "", :null => false |
| 53 | 75 | end |
| 54 | 76 | |
| 55 | add_index "custom_values", ["issue_id"], :name => "custom_values_issue_id" | |
| 56 | ||
| 57 | 77 | create_table "documents", :force => true do |t| |
| 58 | 78 | t.column "project_id", :integer, :default => 0, :null => false |
| 59 | 79 | t.column "category_id", :integer, :default => 0, :null => false |
| 60 | 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 | 82 | t.column "created_on", :timestamp |
| 63 | 83 | end |
| 64 | 84 | |
| ... | ...@@ -93,7 +113,7 @@ | |
| 93 | 113 | t.column "tracker_id", :integer, :default => 0, :null => false |
| 94 | 114 | t.column "project_id", :integer, :default => 0, :null => false |
| 95 | 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 | 117 | t.column "category_id", :integer |
| 98 | 118 | t.column "status_id", :integer, :default => 0, :null => false |
| 99 | 119 | t.column "assigned_to_id", :integer |
| ... | ...@@ -116,8 +136,8 @@ | |
| 116 | 136 | create_table "news", :force => true do |t| |
| 117 | 137 | t.column "project_id", :integer |
| 118 | 138 | t.column "title", :string, :limit => 60, :default => "", :null => false |
| 119 | t.column "shortdescr", :string, :default => "" | |
| 120 | t.column "descr", :text, :default => "", :null => false | |
| 139 | t.column "summary", :string, :limit => 255, :default => "" | |
| 140 | t.column "description", :text, :default => "", :null => false | |
| 121 | 141 | t.column "author_id", :integer, :default => 0, :null => false |
| 122 | 142 | t.column "created_on", :timestamp |
| 123 | 143 | end |
| ... | ...@@ -125,7 +145,7 @@ | |
| 125 | 145 | create_table "permissions", :force => true do |t| |
| 126 | 146 | t.column "controller", :string, :limit => 30, :default => "", :null => false |
| 127 | 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 | 149 | t.column "is_public", :boolean, :default => false, :null => false |
| 130 | 150 | t.column "sort", :integer, :default => 0, :null => false |
| 131 | 151 | t.column "mail_option", :boolean, :default => false, :null => false |
| ... | ...@@ -141,7 +161,7 @@ | |
| 141 | 161 | |
| 142 | 162 | create_table "projects", :force => true do |t| |
| 143 | 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 | 165 | t.column "homepage", :string, :limit => 60, :default => "" |
| 146 | 166 | t.column "is_public", :boolean, :default => true, :null => false |
| 147 | 167 | t.column "parent_id", :integer |
| ... | ...@@ -153,6 +173,13 @@ | |
| 153 | 173 | create_table "roles", :force => true do |t| |
| 154 | 174 | t.column "name", :string, :limit => 30, :default => "", :null => false |
| 155 | 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 | 184 | create_table "trackers", :force => true do |t| |
| 158 | 185 | t.column "name", :string, :limit => 30, :default => "", :null => false |
| ... | ...@@ -167,9 +194,10 @@ | |
| 167 | 194 | t.column "mail", :string, :limit => 60, :default => "", :null => false |
| 168 | 195 | t.column "mail_notification", :boolean, :default => true, :null => false |
| 169 | 196 | t.column "admin", :boolean, :default => false, :null => false |
| 170 | t.column "locked", :boolean, :default => false, :null => false | |
| 197 | t.column "status", :integer, :default => 1, :null => false | |
| 171 | 198 | t.column "last_login_on", :datetime |
| 172 | t.column "language", :string, :limit => 2, :default => "", :null => false | |
| 199 | t.column "language", :string, :limit => 2, :default => "" | |
| 200 | t.column "auth_source_id", :integer | |
| 173 | 201 | t.column "created_on", :timestamp |
| 174 | 202 | t.column "updated_on", :timestamp |
| 175 | 203 | end |
| ... | ...@@ -177,7 +205,7 @@ | |
| 177 | 205 | create_table "versions", :force => true do |t| |
| 178 | 206 | t.column "project_id", :integer, :default => 0, :null => false |
| 179 | 207 | t.column "name", :string, :limit => 30, :default => "", :null => false |
| 180 | t.column "descr", :string, :default => "" | |
| 208 | t.column "description", :string, :default => "" | |
| 181 | 209 | t.column "effective_date", :date, :null => false |
| 182 | 210 | t.column "created_on", :timestamp |
| 183 | 211 | t.column "updated_on", :timestamp |
| ... | ...@@ -191,54 +219,55 @@ | |
| 191 | 219 | end |
| 192 | 220 | |
| 193 | 221 | # project |
| 194 | Permission.create :controller => "projects", :action => "show", :descr => "Overview", :sort => 100, :is_public => true | |
| 195 | Permission.create :controller => "projects", :action => "changelog", :descr => "View change log", :sort => 105, :is_public => true | |
| 196 | Permission.create :controller => "reports", :action => "issue_report", :descr => "View reports", :sort => 110, :is_public => true | |
| 197 | Permission.create :controller => "projects", :action => "settings", :descr => "Settings", :sort => 150 | |
| 198 | Permission.create :controller => "projects", :action => "edit", :descr => "Edit", :sort => 151 | |
| 222 | Permission.create :controller => "projects", :action => "show", :description => "Overview", :sort => 100, :is_public => true | |
| 223 | Permission.create :controller => "projects", :action => "changelog", :description => "View change log", :sort => 105, :is_public => true | |
| 224 | Permission.create :controller => "reports", :action => "issue_report", :description => "View reports", :sort => 110, :is_public => true | |
| 225 | Permission.create :controller => "projects", :action => "settings", :description => "Settings", :sort => 150 | |
| 226 | Permission.create :controller => "projects", :action => "edit", :description => "Edit", :sort => 151 | |
| 199 | 227 | # members |
| 200 | Permission.create :controller => "projects", :action => "list_members", :descr => "View list", :sort => 200, :is_public => true | |
| 201 | Permission.create :controller => "projects", :action => "add_member", :descr => "New member", :sort => 220 | |
| 202 | Permission.create :controller => "members", :action => "edit", :descr => "Edit", :sort => 221 | |
| 203 | Permission.create :controller => "members", :action => "destroy", :descr => "Delete", :sort => 222 | |
| 228 | Permission.create :controller => "projects", :action => "list_members", :description => "View list", :sort => 200, :is_public => true | |
| 229 | Permission.create :controller => "projects", :action => "add_member", :description => "New member", :sort => 220 | |
| 230 | Permission.create :controller => "members", :action => "edit", :description => "Edit", :sort => 221 | |
| 231 | Permission.create :controller => "members", :action => "destroy", :description => "Delete", :sort => 222 | |
| 204 | 232 | # versions |
| 205 | Permission.create :controller => "projects", :action => "add_version", :descr => "New version", :sort => 320 | |
| 206 | Permission.create :controller => "versions", :action => "edit", :descr => "Edit", :sort => 321 | |
| 207 | Permission.create :controller => "versions", :action => "destroy", :descr => "Delete", :sort => 322 | |
| 233 | Permission.create :controller => "projects", :action => "add_version", :description => "New version", :sort => 320 | |
| 234 | Permission.create :controller => "versions", :action => "edit", :description => "Edit", :sort => 321 | |
| 235 | Permission.create :controller => "versions", :action => "destroy", :description => "Delete", :sort => 322 | |
| 208 | 236 | # issue categories |
| 209 | Permission.create :controller => "projects", :action => "add_issue_category", :descr => "New issue category", :sort => 420 | |
| 210 | Permission.create :controller => "issue_categories", :action => "edit", :descr => "Edit", :sort => 421 | |
| 211 | Permission.create :controller => "issue_categories", :action => "destroy", :descr => "Delete", :sort => 422 | |
| 237 | Permission.create :controller => "projects", :action => "add_issue_category", :description => "New issue category", :sort => 420 | |
| 238 | Permission.create :controller => "issue_categories", :action => "edit", :description => "Edit", :sort => 421 | |
| 239 | Permission.create :controller => "issue_categories", :action => "destroy", :description => "Delete", :sort => 422 | |
| 212 | 240 | # issues |
| 213 | Permission.create :controller => "projects", :action => "list_issues", :descr => "View list", :sort => 1000, :is_public => true | |
| 214 | Permission.create :controller => "issues", :action => "show", :descr => "View", :sort => 1005, :is_public => true | |
| 215 | Permission.create :controller => "issues", :action => "download", :descr => "Download file", :sort => 1010, :is_public => true | |
| 216 | Permission.create :controller => "projects", :action => "add_issue", :descr => "Report an issue", :sort => 1050, :mail_option => 1, :mail_enabled => 1 | |
| 217 | Permission.create :controller => "issues", :action => "edit", :descr => "Edit", :sort => 1055 | |
| 218 | Permission.create :controller => "issues", :action => "change_status", :descr => "Change status", :sort => 1060, :mail_option => 1, :mail_enabled => 1 | |
| 219 | Permission.create :controller => "issues", :action => "destroy", :descr => "Delete", :sort => 1065 | |
| 220 | Permission.create :controller => "issues", :action => "add_attachment", :descr => "Add file", :sort => 1070 | |
| 221 | Permission.create :controller => "issues", :action => "destroy_attachment", :descr => "Delete file", :sort => 1075 | |
| 241 | Permission.create :controller => "projects", :action => "list_issues", :description => "View list", :sort => 1000, :is_public => true | |
| 242 | Permission.create :controller => "projects", :action => "export_issues_csv", :description => "Export list to CSV", :sort => 1001, :is_public => true | |
| 243 | Permission.create :controller => "issues", :action => "show", :description => "View", :sort => 1005, :is_public => true | |
| 244 | Permission.create :controller => "issues", :action => "download", :description => "Download file", :sort => 1010, :is_public => true | |
| 245 | Permission.create :controller => "projects", :action => "add_issue", :description => "Report an issue", :sort => 1050, :mail_option => 1, :mail_enabled => 1 | |
| 246 | Permission.create :controller => "issues", :action => "edit", :description => "Edit", :sort => 1055 | |
| 247 | Permission.create :controller => "issues", :action => "change_status", :description => "Change status", :sort => 1060, :mail_option => 1, :mail_enabled => 1 | |
| 248 | Permission.create :controller => "issues", :action => "destroy", :description => "Delete", :sort => 1065 | |
| 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 | 251 | # news |
| 223 | Permission.create :controller => "projects", :action => "list_news", :descr => "View list", :sort => 1100, :is_public => true | |
| 224 | Permission.create :controller => "news", :action => "show", :descr => "View", :sort => 1101, :is_public => true | |
| 225 | Permission.create :controller => "projects", :action => "add_news", :descr => "Add", :sort => 1120 | |
| 226 | Permission.create :controller => "news", :action => "edit", :descr => "Edit", :sort => 1121 | |
| 227 | Permission.create :controller => "news", :action => "destroy", :descr => "Delete", :sort => 1122 | |
| 252 | Permission.create :controller => "projects", :action => "list_news", :description => "View list", :sort => 1100, :is_public => true | |
| 253 | Permission.create :controller => "news", :action => "show", :description => "View", :sort => 1101, :is_public => true | |
| 254 | Permission.create :controller => "projects", :action => "add_news", :description => "Add", :sort => 1120 | |
| 255 | Permission.create :controller => "news", :action => "edit", :description => "Edit", :sort => 1121 | |
| 256 | Permission.create :controller => "news", :action => "destroy", :description => "Delete", :sort => 1122 | |
| 228 | 257 | # documents |
| 229 | Permission.create :controller => "projects", :action => "list_documents", :descr => "View list", :sort => 1200, :is_public => true | |
| 230 | Permission.create :controller => "documents", :action => "show", :descr => "View", :sort => 1201, :is_public => true | |
| 231 | Permission.create :controller => "documents", :action => "download", :descr => "Download", :sort => 1202, :is_public => true | |
| 232 | Permission.create :controller => "projects", :action => "add_document", :descr => "Add", :sort => 1220 | |
| 233 | Permission.create :controller => "documents", :action => "edit", :descr => "Edit", :sort => 1221 | |
| 234 | Permission.create :controller => "documents", :action => "destroy", :descr => "Delete", :sort => 1222 | |
| 235 | Permission.create :controller => "documents", :action => "add_attachment", :descr => "Add file", :sort => 1223 | |
| 236 | Permission.create :controller => "documents", :action => "destroy_attachment", :descr => "Delete file", :sort => 1224 | |
| 258 | Permission.create :controller => "projects", :action => "list_documents", :description => "View list", :sort => 1200, :is_public => true | |
| 259 | Permission.create :controller => "documents", :action => "show", :description => "View", :sort => 1201, :is_public => true | |
| 260 | Permission.create :controller => "documents", :action => "download", :description => "Download", :sort => 1202, :is_public => true | |
| 261 | Permission.create :controller => "projects", :action => "add_document", :description => "Add", :sort => 1220 | |
| 262 | Permission.create :controller => "documents", :action => "edit", :description => "Edit", :sort => 1221 | |
| 263 | Permission.create :controller => "documents", :action => "destroy", :description => "Delete", :sort => 1222 | |
| 264 | Permission.create :controller => "documents", :action => "add_attachment", :description => "Add file", :sort => 1223 | |
| 265 | Permission.create :controller => "documents", :action => "destroy_attachment", :description => "Delete file", :sort => 1224 | |
| 237 | 266 | # files |
| 238 | Permission.create :controller => "projects", :action => "list_files", :descr => "View list", :sort => 1300, :is_public => true | |
| 239 | Permission.create :controller => "versions", :action => "download", :descr => "Download", :sort => 1301, :is_public => true | |
| 240 | Permission.create :controller => "projects", :action => "add_file", :descr => "Add", :sort => 1320 | |
| 241 | Permission.create :controller => "versions", :action => "destroy_file", :descr => "Delete", :sort => 1322 | |
| 267 | Permission.create :controller => "projects", :action => "list_files", :description => "View list", :sort => 1300, :is_public => true | |
| 268 | Permission.create :controller => "versions", :action => "download", :description => "Download", :sort => 1301, :is_public => true | |
| 269 | Permission.create :controller => "projects", :action => "add_file", :description => "Add", :sort => 1320 | |
| 270 | Permission.create :controller => "versions", :action => "destroy_file", :description => "Delete", :sort => 1322 | |
| 242 | 271 | |
| 243 | 272 | # create default administrator account |
| 244 | 273 | user = User.create :firstname => "redMine", :lastname => "Admin", :mail => "admin@somenet.foo", :mail_notification => true, :language => "en" |
| ... | ...@@ -251,9 +280,11 @@ | |
| 251 | 280 | end |
| 252 | 281 | |
| 253 | 282 | def self.down |
| 254 | drop_table :attachments | |
| 283 | drop_table :attachments | |
| 284 | drop_table :auth_sources | |
| 255 | 285 | drop_table :custom_fields |
| 256 | drop_table :custom_fields_projects | |
| 286 | drop_table :custom_fields_projects | |
| 287 | drop_table :custom_fields_trackers | |
| 257 | 288 | drop_table :custom_values |
| 258 | 289 | drop_table :documents |
| 259 | 290 | drop_table :enumerations |
| ... | ...@@ -268,6 +299,7 @@ | |
| 268 | 299 | drop_table :projects |
| 269 | 300 | drop_table :roles |
| 270 | 301 | drop_table :trackers |
| 302 | drop_table :tokens | |
| 271 | 303 | drop_table :users |
| 272 | 304 | drop_table :versions |
| 273 | 305 | drop_table :workflows |