remove trailing white-spaces from db/migrate/001_setup.rb (#9510)
Contributed by Igor Zubkov. git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@7746 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
parent
0e85b6c587
commit
e6825e7e0c
|
@ -5,22 +5,22 @@
|
||||||
# modify it under the terms of the GNU General Public License
|
# modify it under the terms of the GNU General Public License
|
||||||
# as published by the Free Software Foundation; either version 2
|
# as published by the Free Software Foundation; either version 2
|
||||||
# of the License, or (at your option) any later version.
|
# of the License, or (at your option) any later version.
|
||||||
#
|
#
|
||||||
# This program is distributed in the hope that it will be useful,
|
# This program is distributed in the hope that it will be useful,
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
#
|
#
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||||
|
|
||||||
class Setup < ActiveRecord::Migration
|
class Setup < ActiveRecord::Migration
|
||||||
|
|
||||||
class User < ActiveRecord::Base; end
|
class User < ActiveRecord::Base; end
|
||||||
# model removed
|
# model removed
|
||||||
class Permission < ActiveRecord::Base; end
|
class Permission < ActiveRecord::Base; end
|
||||||
|
|
||||||
def self.up
|
def self.up
|
||||||
create_table "attachments", :force => true do |t|
|
create_table "attachments", :force => true do |t|
|
||||||
t.column "container_id", :integer, :default => 0, :null => false
|
t.column "container_id", :integer, :default => 0, :null => false
|
||||||
|
@ -49,7 +49,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "attr_mail", :string, :limit => 30
|
t.column "attr_mail", :string, :limit => 30
|
||||||
t.column "onthefly_register", :boolean, :default => false, :null => false
|
t.column "onthefly_register", :boolean, :default => false, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "custom_fields", :force => true do |t|
|
create_table "custom_fields", :force => true do |t|
|
||||||
t.column "type", :string, :limit => 30, :default => "", :null => false
|
t.column "type", :string, :limit => 30, :default => "", :null => false
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
|
@ -61,7 +61,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "is_required", :boolean, :default => false, :null => false
|
t.column "is_required", :boolean, :default => false, :null => false
|
||||||
t.column "is_for_all", :boolean, :default => false, :null => false
|
t.column "is_for_all", :boolean, :default => false, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "custom_fields_projects", :id => false, :force => true do |t|
|
create_table "custom_fields_projects", :id => false, :force => true do |t|
|
||||||
t.column "custom_field_id", :integer, :default => 0, :null => false
|
t.column "custom_field_id", :integer, :default => 0, :null => false
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
|
@ -78,7 +78,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "custom_field_id", :integer, :default => 0, :null => false
|
t.column "custom_field_id", :integer, :default => 0, :null => false
|
||||||
t.column "value", :text
|
t.column "value", :text
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "documents", :force => true do |t|
|
create_table "documents", :force => true do |t|
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
t.column "category_id", :integer, :default => 0, :null => false
|
t.column "category_id", :integer, :default => 0, :null => false
|
||||||
|
@ -86,21 +86,21 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "description", :text
|
t.column "description", :text
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||||
|
|
||||||
create_table "enumerations", :force => true do |t|
|
create_table "enumerations", :force => true do |t|
|
||||||
t.column "opt", :string, :limit => 4, :default => "", :null => false
|
t.column "opt", :string, :limit => 4, :default => "", :null => false
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "issue_categories", :force => true do |t|
|
create_table "issue_categories", :force => true do |t|
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
||||||
|
|
||||||
create_table "issue_histories", :force => true do |t|
|
create_table "issue_histories", :force => true do |t|
|
||||||
t.column "issue_id", :integer, :default => 0, :null => false
|
t.column "issue_id", :integer, :default => 0, :null => false
|
||||||
t.column "status_id", :integer, :default => 0, :null => false
|
t.column "status_id", :integer, :default => 0, :null => false
|
||||||
|
@ -108,7 +108,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "notes", :text
|
t.column "notes", :text
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
|
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
|
||||||
|
|
||||||
create_table "issue_statuses", :force => true do |t|
|
create_table "issue_statuses", :force => true do |t|
|
||||||
|
@ -117,7 +117,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "is_default", :boolean, :default => false, :null => false
|
t.column "is_default", :boolean, :default => false, :null => false
|
||||||
t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
|
t.column "html_color", :string, :limit => 6, :default => "FFFFFF", :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "issues", :force => true do |t|
|
create_table "issues", :force => true do |t|
|
||||||
t.column "tracker_id", :integer, :default => 0, :null => false
|
t.column "tracker_id", :integer, :default => 0, :null => false
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
|
@ -134,16 +134,16 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
t.column "updated_on", :timestamp
|
t.column "updated_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "issues", ["project_id"], :name => "issues_project_id"
|
add_index "issues", ["project_id"], :name => "issues_project_id"
|
||||||
|
|
||||||
create_table "members", :force => true do |t|
|
create_table "members", :force => true do |t|
|
||||||
t.column "user_id", :integer, :default => 0, :null => false
|
t.column "user_id", :integer, :default => 0, :null => false
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
t.column "role_id", :integer, :default => 0, :null => false
|
t.column "role_id", :integer, :default => 0, :null => false
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "news", :force => true do |t|
|
create_table "news", :force => true do |t|
|
||||||
t.column "project_id", :integer
|
t.column "project_id", :integer
|
||||||
t.column "title", :string, :limit => 60, :default => "", :null => false
|
t.column "title", :string, :limit => 60, :default => "", :null => false
|
||||||
|
@ -152,9 +152,9 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "author_id", :integer, :default => 0, :null => false
|
t.column "author_id", :integer, :default => 0, :null => false
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "news", ["project_id"], :name => "news_project_id"
|
add_index "news", ["project_id"], :name => "news_project_id"
|
||||||
|
|
||||||
create_table "permissions", :force => true do |t|
|
create_table "permissions", :force => true do |t|
|
||||||
t.column "controller", :string, :limit => 30, :default => "", :null => false
|
t.column "controller", :string, :limit => 30, :default => "", :null => false
|
||||||
t.column "action", :string, :limit => 30, :default => "", :null => false
|
t.column "action", :string, :limit => 30, :default => "", :null => false
|
||||||
|
@ -164,14 +164,14 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "mail_option", :boolean, :default => false, :null => false
|
t.column "mail_option", :boolean, :default => false, :null => false
|
||||||
t.column "mail_enabled", :boolean, :default => false, :null => false
|
t.column "mail_enabled", :boolean, :default => false, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "permissions_roles", :id => false, :force => true do |t|
|
create_table "permissions_roles", :id => false, :force => true do |t|
|
||||||
t.column "permission_id", :integer, :default => 0, :null => false
|
t.column "permission_id", :integer, :default => 0, :null => false
|
||||||
t.column "role_id", :integer, :default => 0, :null => false
|
t.column "role_id", :integer, :default => 0, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
|
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
|
||||||
|
|
||||||
create_table "projects", :force => true do |t|
|
create_table "projects", :force => true do |t|
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
t.column "description", :string, :default => "", :null => false
|
t.column "description", :string, :default => "", :null => false
|
||||||
|
@ -182,7 +182,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
t.column "updated_on", :timestamp
|
t.column "updated_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "roles", :force => true do |t|
|
create_table "roles", :force => true do |t|
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
end
|
end
|
||||||
|
@ -193,12 +193,12 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "value", :string, :limit => 40, :default => "", :null => false
|
t.column "value", :string, :limit => 40, :default => "", :null => false
|
||||||
t.column "created_on", :datetime, :null => false
|
t.column "created_on", :datetime, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "trackers", :force => true do |t|
|
create_table "trackers", :force => true do |t|
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
t.column "is_in_chlog", :boolean, :default => false, :null => false
|
t.column "is_in_chlog", :boolean, :default => false, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "users", :force => true do |t|
|
create_table "users", :force => true do |t|
|
||||||
t.column "login", :string, :limit => 30, :default => "", :null => false
|
t.column "login", :string, :limit => 30, :default => "", :null => false
|
||||||
t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
|
t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
|
||||||
|
@ -214,7 +214,7 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
t.column "updated_on", :timestamp
|
t.column "updated_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
create_table "versions", :force => true do |t|
|
create_table "versions", :force => true do |t|
|
||||||
t.column "project_id", :integer, :default => 0, :null => false
|
t.column "project_id", :integer, :default => 0, :null => false
|
||||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||||
|
@ -223,16 +223,16 @@ class Setup < ActiveRecord::Migration
|
||||||
t.column "created_on", :timestamp
|
t.column "created_on", :timestamp
|
||||||
t.column "updated_on", :timestamp
|
t.column "updated_on", :timestamp
|
||||||
end
|
end
|
||||||
|
|
||||||
add_index "versions", ["project_id"], :name => "versions_project_id"
|
add_index "versions", ["project_id"], :name => "versions_project_id"
|
||||||
|
|
||||||
create_table "workflows", :force => true do |t|
|
create_table "workflows", :force => true do |t|
|
||||||
t.column "tracker_id", :integer, :default => 0, :null => false
|
t.column "tracker_id", :integer, :default => 0, :null => false
|
||||||
t.column "old_status_id", :integer, :default => 0, :null => false
|
t.column "old_status_id", :integer, :default => 0, :null => false
|
||||||
t.column "new_status_id", :integer, :default => 0, :null => false
|
t.column "new_status_id", :integer, :default => 0, :null => false
|
||||||
t.column "role_id", :integer, :default => 0, :null => false
|
t.column "role_id", :integer, :default => 0, :null => false
|
||||||
end
|
end
|
||||||
|
|
||||||
# project
|
# project
|
||||||
Permission.create :controller => "projects", :action => "show", :description => "label_overview", :sort => 100, :is_public => true
|
Permission.create :controller => "projects", :action => "show", :description => "label_overview", :sort => 100, :is_public => true
|
||||||
Permission.create :controller => "projects", :action => "changelog", :description => "label_change_log", :sort => 105, :is_public => true
|
Permission.create :controller => "projects", :action => "changelog", :description => "label_change_log", :sort => 105, :is_public => true
|
||||||
|
@ -283,7 +283,7 @@ class Setup < ActiveRecord::Migration
|
||||||
Permission.create :controller => "versions", :action => "download", :description => "button_download", :sort => 1301, :is_public => true
|
Permission.create :controller => "versions", :action => "download", :description => "button_download", :sort => 1301, :is_public => true
|
||||||
Permission.create :controller => "projects", :action => "add_file", :description => "button_add", :sort => 1320
|
Permission.create :controller => "projects", :action => "add_file", :description => "button_add", :sort => 1320
|
||||||
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
|
Permission.create :controller => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
|
||||||
|
|
||||||
# create default administrator account
|
# create default administrator account
|
||||||
user = User.create :login => "admin",
|
user = User.create :login => "admin",
|
||||||
:hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
|
:hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||||
|
|
Loading…
Reference in New Issue