trustie2 removed migrates
This commit is contained in:
parent
302a0b0f72
commit
58c7ac5380
|
@ -1,323 +0,0 @@
|
|||
# Redmine - project management software
|
||||
# Copyright (C) 2006 Jean-Philippe Lang
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or
|
||||
# modify it under the terms of the GNU General Public License
|
||||
# as published by the Free Software Foundation; either version 2
|
||||
# of the License, or (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
class Setup < ActiveRecord::Migration
|
||||
|
||||
class User < ActiveRecord::Base; end
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
create_table "attachments", :force => true do |t|
|
||||
t.column "container_id", :integer, :default => 0, :null => false
|
||||
t.column "container_type", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "filename", :string, :default => "", :null => false
|
||||
t.column "disk_filename", :string, :default => "", :null => false
|
||||
t.column "filesize", :integer, :default => 0, :null => false
|
||||
t.column "content_type", :string, :limit => 60, :default => ""
|
||||
t.column "digest", :string, :limit => 40, :default => "", :null => false
|
||||
t.column "downloads", :integer, :default => 0, :null => false
|
||||
t.column "author_id", :integer, :default => 0, :null => false
|
||||
t.column "created_on", :timestamp
|
||||
end
|
||||
|
||||
create_table "auth_sources", :force => true do |t|
|
||||
t.column "type", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "name", :string, :limit => 60, :default => "", :null => false
|
||||
t.column "host", :string, :limit => 60
|
||||
t.column "port", :integer
|
||||
t.column "account", :string, :limit => 60
|
||||
t.column "account_password", :string, :limit => 60
|
||||
t.column "base_dn", :string, :limit => 255
|
||||
t.column "attr_login", :string, :limit => 30
|
||||
t.column "attr_firstname", :string, :limit => 30
|
||||
t.column "attr_lastname", :string, :limit => 30
|
||||
t.column "attr_mail", :string, :limit => 30
|
||||
t.column "onthefly_register", :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
create_table "custom_fields", :force => true do |t|
|
||||
t.column "type", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "field_format", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "possible_values", :text
|
||||
t.column "regexp", :string, :default => ""
|
||||
t.column "min_length", :integer, :default => 0, :null => false
|
||||
t.column "max_length", :integer, :default => 0, :null => false
|
||||
t.column "is_required", :boolean, :default => false, :null => false
|
||||
t.column "is_for_all", :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
create_table "custom_fields_projects", :id => false, :force => true do |t|
|
||||
t.column "custom_field_id", :integer, :default => 0, :null => false
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
create_table "custom_fields_trackers", :id => false, :force => true do |t|
|
||||
t.column "custom_field_id", :integer, :default => 0, :null => false
|
||||
t.column "tracker_id", :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
create_table "custom_values", :force => true do |t|
|
||||
t.column "customized_type", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "customized_id", :integer, :default => 0, :null => false
|
||||
t.column "custom_field_id", :integer, :default => 0, :null => false
|
||||
t.column "value", :text
|
||||
end
|
||||
|
||||
create_table "documents", :force => true do |t|
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
t.column "category_id", :integer, :default => 0, :null => false
|
||||
t.column "title", :string, :limit => 60, :default => "", :null => false
|
||||
t.column "description", :text
|
||||
t.column "created_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "documents", ["project_id"], :name => "documents_project_id"
|
||||
|
||||
create_table "enumerations", :force => true do |t|
|
||||
t.column "opt", :string, :limit => 4, :default => "", :null => false
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
create_table "issue_categories", :force => true do |t|
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
add_index "issue_categories", ["project_id"], :name => "issue_categories_project_id"
|
||||
|
||||
create_table "issue_histories", :force => true do |t|
|
||||
t.column "issue_id", :integer, :default => 0, :null => false
|
||||
t.column "status_id", :integer, :default => 0, :null => false
|
||||
t.column "author_id", :integer, :default => 0, :null => false
|
||||
t.column "notes", :text
|
||||
t.column "created_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
|
||||
|
||||
create_table "issue_statuses", :force => true do |t|
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "is_closed", :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
|
||||
end
|
||||
|
||||
create_table "issues", :force => true do |t|
|
||||
t.column "tracker_id", :integer, :default => 0, :null => false
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
t.column "title", :string, :default => "", :null => false
|
||||
t.column "description", :text
|
||||
t.column "due_date", :date
|
||||
t.column "category_id", :integer
|
||||
t.column "status_id", :integer, :default => 0, :null => false
|
||||
t.column "assigned_to_id", :integer
|
||||
t.column "priority_id", :integer, :default => 0, :null => false
|
||||
t.column "fixed_version_id", :integer
|
||||
t.column "author_id", :integer, :default => 0, :null => false
|
||||
t.column "lock_version", :integer, :default => 0, :null => false
|
||||
t.column "created_on", :timestamp
|
||||
t.column "updated_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "issues", ["project_id"], :name => "issues_project_id"
|
||||
|
||||
create_table "members", :force => true do |t|
|
||||
t.column "user_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 "created_on", :timestamp
|
||||
end
|
||||
|
||||
create_table "news", :force => true do |t|
|
||||
t.column "project_id", :integer
|
||||
t.column "title", :string, :limit => 60, :default => "", :null => false
|
||||
t.column "summary", :string, :limit => 255, :default => ""
|
||||
t.column "description", :text
|
||||
t.column "author_id", :integer, :default => 0, :null => false
|
||||
t.column "created_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "news", ["project_id"], :name => "news_project_id"
|
||||
|
||||
create_table "permissions", :force => true do |t|
|
||||
t.column "controller", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "action", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "description", :string, :limit => 60, :default => "", :null => false
|
||||
t.column "is_public", :boolean, :default => false, :null => false
|
||||
t.column "sort", :integer, :default => 0, :null => false
|
||||
t.column "mail_option", :boolean, :default => false, :null => false
|
||||
t.column "mail_enabled", :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
create_table "permissions_roles", :id => false, :force => true do |t|
|
||||
t.column "permission_id", :integer, :default => 0, :null => false
|
||||
t.column "role_id", :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
add_index "permissions_roles", ["role_id"], :name => "permissions_roles_role_id"
|
||||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "description", :string, :default => "", :null => false
|
||||
t.column "homepage", :string, :limit => 60, :default => ""
|
||||
t.column "is_public", :boolean, :default => true, :null => false
|
||||
t.column "parent_id", :integer
|
||||
t.column "projects_count", :integer, :default => 0
|
||||
t.column "created_on", :timestamp
|
||||
t.column "updated_on", :timestamp
|
||||
end
|
||||
|
||||
create_table "roles", :force => true do |t|
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
end
|
||||
|
||||
create_table "tokens", :force => true do |t|
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "action", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "value", :string, :limit => 40, :default => "", :null => false
|
||||
t.column "created_on", :datetime, :null => false
|
||||
end
|
||||
|
||||
create_table "trackers", :force => true do |t|
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "is_in_chlog", :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
create_table "users", :force => true do |t|
|
||||
t.column "login", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "hashed_password", :string, :limit => 40, :default => "", :null => false
|
||||
t.column "firstname", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "lastname", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "mail", :string, :limit => 60, :default => "", :null => false
|
||||
t.column "mail_notification", :boolean, :default => true, :null => false
|
||||
t.column "admin", :boolean, :default => false, :null => false
|
||||
t.column "status", :integer, :default => 1, :null => false
|
||||
t.column "last_login_on", :datetime
|
||||
t.column "language", :string, :limit => 2, :default => ""
|
||||
t.column "auth_source_id", :integer
|
||||
t.column "created_on", :timestamp
|
||||
t.column "updated_on", :timestamp
|
||||
end
|
||||
|
||||
create_table "versions", :force => true do |t|
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "description", :string, :default => ""
|
||||
t.column "effective_date", :date
|
||||
t.column "created_on", :timestamp
|
||||
t.column "updated_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "versions", ["project_id"], :name => "versions_project_id"
|
||||
|
||||
create_table "workflows", :force => true do |t|
|
||||
t.column "tracker_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 "role_id", :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
# project
|
||||
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 => "reports", :action => "issue_report", :description => "label_report_plural", :sort => 110, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "settings", :description => "label_settings", :sort => 150
|
||||
Permission.create :controller => "projects", :action => "edit", :description => "button_edit", :sort => 151
|
||||
# members
|
||||
Permission.create :controller => "projects", :action => "list_members", :description => "button_list", :sort => 200, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "add_member", :description => "button_add", :sort => 220
|
||||
Permission.create :controller => "members", :action => "edit", :description => "button_edit", :sort => 221
|
||||
Permission.create :controller => "members", :action => "destroy", :description => "button_delete", :sort => 222
|
||||
# versions
|
||||
Permission.create :controller => "projects", :action => "add_version", :description => "button_add", :sort => 320
|
||||
Permission.create :controller => "versions", :action => "edit", :description => "button_edit", :sort => 321
|
||||
Permission.create :controller => "versions", :action => "destroy", :description => "button_delete", :sort => 322
|
||||
# issue categories
|
||||
Permission.create :controller => "projects", :action => "add_issue_category", :description => "button_add", :sort => 420
|
||||
Permission.create :controller => "issue_categories", :action => "edit", :description => "button_edit", :sort => 421
|
||||
Permission.create :controller => "issue_categories", :action => "destroy", :description => "button_delete", :sort => 422
|
||||
# issues
|
||||
Permission.create :controller => "projects", :action => "list_issues", :description => "button_list", :sort => 1000, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "export_issues_csv", :description => "label_export_csv", :sort => 1001, :is_public => true
|
||||
Permission.create :controller => "issues", :action => "show", :description => "button_view", :sort => 1005, :is_public => true
|
||||
Permission.create :controller => "issues", :action => "download", :description => "button_download", :sort => 1010, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "add_issue", :description => "button_add", :sort => 1050, :mail_option => 1, :mail_enabled => 1
|
||||
Permission.create :controller => "issues", :action => "edit", :description => "button_edit", :sort => 1055
|
||||
Permission.create :controller => "issues", :action => "change_status", :description => "label_change_status", :sort => 1060, :mail_option => 1, :mail_enabled => 1
|
||||
Permission.create :controller => "issues", :action => "destroy", :description => "button_delete", :sort => 1065
|
||||
Permission.create :controller => "issues", :action => "add_attachment", :description => "label_attachment_new", :sort => 1070
|
||||
Permission.create :controller => "issues", :action => "destroy_attachment", :description => "label_attachment_delete", :sort => 1075
|
||||
# news
|
||||
Permission.create :controller => "projects", :action => "list_news", :description => "button_list", :sort => 1100, :is_public => true
|
||||
Permission.create :controller => "news", :action => "show", :description => "button_view", :sort => 1101, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "add_news", :description => "button_add", :sort => 1120
|
||||
Permission.create :controller => "news", :action => "edit", :description => "button_edit", :sort => 1121
|
||||
Permission.create :controller => "news", :action => "destroy", :description => "button_delete", :sort => 1122
|
||||
# documents
|
||||
Permission.create :controller => "projects", :action => "list_documents", :description => "button_list", :sort => 1200, :is_public => true
|
||||
Permission.create :controller => "documents", :action => "show", :description => "button_view", :sort => 1201, :is_public => true
|
||||
Permission.create :controller => "documents", :action => "download", :description => "button_download", :sort => 1202, :is_public => true
|
||||
Permission.create :controller => "projects", :action => "add_document", :description => "button_add", :sort => 1220
|
||||
Permission.create :controller => "documents", :action => "edit", :description => "button_edit", :sort => 1221
|
||||
Permission.create :controller => "documents", :action => "destroy", :description => "button_delete", :sort => 1222
|
||||
Permission.create :controller => "documents", :action => "add_attachment", :description => "label_attachment_new", :sort => 1223
|
||||
Permission.create :controller => "documents", :action => "destroy_attachment", :description => "label_attachment_delete", :sort => 1224
|
||||
# files
|
||||
Permission.create :controller => "projects", :action => "list_files", :description => "button_list", :sort => 1300, :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 => "versions", :action => "destroy_file", :description => "button_delete", :sort => 1322
|
||||
|
||||
# create default administrator account
|
||||
user = User.create :login => "admin",
|
||||
:hashed_password => "d033e22ae348aeb5660fc2140aec35850c4da997",
|
||||
:admin => true,
|
||||
:firstname => "Trustie",
|
||||
:lastname => "Admin",
|
||||
:mail => "admin@example.net",
|
||||
:mail_notification => true,
|
||||
:status => 1
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :attachments
|
||||
drop_table :auth_sources
|
||||
drop_table :custom_fields
|
||||
drop_table :custom_fields_projects
|
||||
drop_table :custom_fields_trackers
|
||||
drop_table :custom_values
|
||||
drop_table :documents
|
||||
drop_table :enumerations
|
||||
drop_table :issue_categories
|
||||
drop_table :issue_histories
|
||||
drop_table :issue_statuses
|
||||
drop_table :issues
|
||||
drop_table :members
|
||||
drop_table :news
|
||||
drop_table :permissions
|
||||
drop_table :permissions_roles
|
||||
drop_table :projects
|
||||
drop_table :roles
|
||||
drop_table :trackers
|
||||
drop_table :tokens
|
||||
drop_table :users
|
||||
drop_table :versions
|
||||
drop_table :workflows
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class IssueMove < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "move_issues", :description => "button_move", :sort => 1061, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'projects', 'move_issues').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class IssueAddNote < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "issues", :action => "add_note", :description => "label_add_note", :sort => 1057, :mail_option => 1, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'issues', 'add_note').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class ExportPdf < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "export_issues_pdf", :description => "label_export_pdf", :sort => 1002, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "issues", :action => "export_pdf", :description => "label_export_pdf", :sort => 1015, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'projects', 'export_issues_pdf').first.destroy
|
||||
Permission.where("controller=? and action=?", 'issues', 'export_pdf').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class IssueStartDate < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :issues, :start_date, :date
|
||||
add_column :issues, :done_ratio, :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :issues, :start_date
|
||||
remove_column :issues, :done_ratio
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class CalendarAndActivity < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "activity", :description => "label_activity", :sort => 160, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "projects", :action => "calendar", :description => "label_calendar", :sort => 165, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "projects", :action => "gantt", :description => "label_gantt", :sort => 166, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'projects', 'activity').first.destroy
|
||||
Permission.where("controller=? and action=?", 'projects', 'calendar').first.destroy
|
||||
Permission.where("controller=? and action=?", 'projects', 'gantt').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,56 +0,0 @@
|
|||
class CreateJournals < ActiveRecord::Migration
|
||||
|
||||
# model removed, but needed for data migration
|
||||
class IssueHistory < ActiveRecord::Base; belongs_to :issue; end
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
create_table :journals, :force => true do |t|
|
||||
t.column "journalized_id", :integer, :default => 0, :null => false
|
||||
t.column "journalized_type", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "notes", :text
|
||||
t.column "created_on", :datetime, :null => false
|
||||
end
|
||||
create_table :journal_details, :force => true do |t|
|
||||
t.column "journal_id", :integer, :default => 0, :null => false
|
||||
t.column "property", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "prop_key", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "old_value", :string
|
||||
t.column "value", :string
|
||||
end
|
||||
|
||||
# indexes
|
||||
add_index "journals", ["journalized_id", "journalized_type"], :name => "journals_journalized_id"
|
||||
add_index "journal_details", ["journal_id"], :name => "journal_details_journal_id"
|
||||
|
||||
Permission.create :controller => "issues", :action => "history", :description => "label_history", :sort => 1006, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
|
||||
# data migration
|
||||
IssueHistory.all.each {|h|
|
||||
j = Journal.new(:journalized => h.issue, :user_id => h.author_id, :notes => h.notes, :created_on => h.created_on)
|
||||
j.details << JournalDetail.new(:property => 'attr', :prop_key => 'status_id', :value => h.status_id)
|
||||
j.save
|
||||
}
|
||||
|
||||
drop_table :issue_histories
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :journal_details
|
||||
drop_table :journals
|
||||
|
||||
create_table "issue_histories", :force => true do |t|
|
||||
t.column "issue_id", :integer, :default => 0, :null => false
|
||||
t.column "status_id", :integer, :default => 0, :null => false
|
||||
t.column "author_id", :integer, :default => 0, :null => false
|
||||
t.column "notes", :text, :default => ""
|
||||
t.column "created_on", :timestamp
|
||||
end
|
||||
|
||||
add_index "issue_histories", ["issue_id"], :name => "issue_histories_issue_id"
|
||||
|
||||
Permission.where("controller=? and action=?", 'issues', 'history').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class CreateUserPreferences < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :user_preferences do |t|
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "others", :text
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :user_preferences
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddHideMailPref < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :user_preferences, :hide_mail, :boolean, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :user_preferences, :hide_mail
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class CreateComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :comments do |t|
|
||||
t.column :commented_type, :string, :limit => 30, :default => "", :null => false
|
||||
t.column :commented_id, :integer, :default => 0, :null => false
|
||||
t.column :author_id, :integer, :default => 0, :null => false
|
||||
t.column :comments, :text
|
||||
t.column :created_on, :datetime, :null => false
|
||||
t.column :updated_on, :datetime, :null => false
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :comments
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddNewsCommentsCount < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :news, :comments_count, :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :news, :comments_count
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class AddCommentsPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "news", :action => "add_comment", :description => "label_comment_add", :sort => 1130, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "news", :action => "destroy_comment", :description => "label_comment_delete", :sort => 1133, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'news', 'add_comment').first.destroy
|
||||
Permission.where("controller=? and action=?", 'news', 'destroy_comment').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
class CreateQueries < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :queries, :force => true do |t|
|
||||
t.column "project_id", :integer
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "filters", :text
|
||||
t.column "user_id", :integer, :default => 0, :null => false
|
||||
t.column "is_public", :boolean, :default => false, :null => false
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :queries
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddQueriesPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "add_query", :description => "button_create", :sort => 600, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'projects', 'add_query').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class CreateRepositories < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :repositories, :force => true do |t|
|
||||
t.column "project_id", :integer, :default => 0, :null => false
|
||||
t.column "url", :string, :default => "", :null => false
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :repositories
|
||||
end
|
||||
end
|
|
@ -1,22 +0,0 @@
|
|||
class AddRepositoriesPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "repositories", :action => "show", :description => "button_view", :sort => 1450, :is_public => true
|
||||
Permission.create :controller => "repositories", :action => "browse", :description => "label_browse", :sort => 1460, :is_public => true
|
||||
Permission.create :controller => "repositories", :action => "entry", :description => "entry", :sort => 1462, :is_public => true
|
||||
Permission.create :controller => "repositories", :action => "revisions", :description => "label_view_revisions", :sort => 1470, :is_public => true
|
||||
Permission.create :controller => "repositories", :action => "revision", :description => "label_view_revisions", :sort => 1472, :is_public => true
|
||||
Permission.create :controller => "repositories", :action => "diff", :description => "diff", :sort => 1480, :is_public => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'repositories', 'show').first.destroy
|
||||
Permission.where("controller=? and action=?", 'repositories', 'browse').first.destroy
|
||||
Permission.where("controller=? and action=?", 'repositories', 'entry').first.destroy
|
||||
Permission.where("controller=? and action=?", 'repositories', 'revisions').first.destroy
|
||||
Permission.where("controller=? and action=?", 'repositories', 'revision').first.destroy
|
||||
Permission.where("controller=? and action=?", 'repositories', 'diff').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class CreateSettings < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :settings, :force => true do |t|
|
||||
t.column "name", :string, :limit => 30, :default => "", :null => false
|
||||
t.column "value", :text
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :settings
|
||||
end
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
class SetDocAndFilesNotifications < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.find_by_controller_and_action("projects", "add_file").update_attribute(:mail_option, true)
|
||||
Permission.find_by_controller_and_action("projects", "add_document").update_attribute(:mail_option, true)
|
||||
Permission.find_by_controller_and_action("documents", "add_attachment").update_attribute(:mail_option, true)
|
||||
Permission.find_by_controller_and_action("issues", "add_attachment").update_attribute(:mail_option, true)
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action("projects", "add_file").update_attribute(:mail_option, false)
|
||||
Permission.find_by_controller_and_action("projects", "add_document").update_attribute(:mail_option, false)
|
||||
Permission.find_by_controller_and_action("documents", "add_attachment").update_attribute(:mail_option, false)
|
||||
Permission.find_by_controller_and_action("issues", "add_attachment").update_attribute(:mail_option, false)
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class AddIssueStatusPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :issue_statuses, :position, :integer, :default => 1
|
||||
IssueStatus.all.each_with_index {|status, i| status.update_attribute(:position, i+1)}
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :issue_statuses, :position
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class AddRolePosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :roles, :position, :integer, :default => 1
|
||||
Role.all.each_with_index {|role, i| role.update_attribute(:position, i+1)}
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :roles, :position
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class AddTrackerPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :trackers, :position, :integer, :default => 1
|
||||
Tracker.all.each_with_index {|tracker, i| tracker.update_attribute(:position, i+1)}
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :trackers, :position
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class SerializePossiblesValues < ActiveRecord::Migration
|
||||
def self.up
|
||||
CustomField.all.each do |field|
|
||||
if field.possible_values and field.possible_values.is_a? String
|
||||
field.possible_values = field.possible_values.split('|')
|
||||
field.save
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddTrackerIsInRoadmap < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :trackers, :is_in_roadmap, :boolean, :default => true, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :trackers, :is_in_roadmap
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddRoadmapPermission < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "roadmap", :description => "label_roadmap", :sort => 107, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.where("controller=? and action=?", 'projects', 'roadmap').first.destroy
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddSearchPermission < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "search", :description => "label_search", :sort => 130, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('projects', 'search').destroy
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddRepositoryLoginAndPassword < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :repositories, :login, :string, :limit => 60, :default => ""
|
||||
add_column :repositories, :password, :string, :limit => 60, :default => ""
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :repositories, :login
|
||||
remove_column :repositories, :password
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class CreateWikis < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :wikis do |t|
|
||||
t.column :project_id, :integer, :null => false
|
||||
t.column :start_page, :string, :limit => 255, :null => false
|
||||
t.column :status, :integer, :default => 1, :null => false
|
||||
end
|
||||
add_index :wikis, :project_id, :name => :wikis_project_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :wikis
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class CreateWikiPages < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :wiki_pages do |t|
|
||||
t.column :wiki_id, :integer, :null => false
|
||||
t.column :title, :string, :limit => 255, :null => false
|
||||
t.column :created_on, :datetime, :null => false
|
||||
end
|
||||
add_index :wiki_pages, [:wiki_id, :title], :name => :wiki_pages_wiki_id_title
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :wiki_pages
|
||||
end
|
||||
end
|
|
@ -1,30 +0,0 @@
|
|||
class CreateWikiContents < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :wiki_contents do |t|
|
||||
t.column :page_id, :integer, :null => false
|
||||
t.column :author_id, :integer
|
||||
t.column :text, :text
|
||||
t.column :comments, :string, :limit => 255, :default => ""
|
||||
t.column :updated_on, :datetime, :null => false
|
||||
t.column :version, :integer, :null => false
|
||||
end
|
||||
add_index :wiki_contents, :page_id, :name => :wiki_contents_page_id
|
||||
|
||||
create_table :wiki_content_versions do |t|
|
||||
t.column :wiki_content_id, :integer, :null => false
|
||||
t.column :page_id, :integer, :null => false
|
||||
t.column :author_id, :integer
|
||||
t.column :data, :binary
|
||||
t.column :compression, :string, :limit => 6, :default => ""
|
||||
t.column :comments, :string, :limit => 255, :default => ""
|
||||
t.column :updated_on, :datetime, :null => false
|
||||
t.column :version, :integer, :null => false
|
||||
end
|
||||
add_index :wiki_content_versions, :wiki_content_id, :name => :wiki_content_versions_wcid
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :wiki_contents
|
||||
drop_table :wiki_content_versions
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddProjectsFeedsPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "projects", :action => "feeds", :description => "label_feed_plural", :sort => 132, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('projects', 'feeds').destroy
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddRepositoryRootUrl < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :repositories, :root_url, :string, :limit => 255, :default => ""
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :repositories, :root_url
|
||||
end
|
||||
end
|
|
@ -1,24 +0,0 @@
|
|||
class CreateTimeEntries < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :time_entries do |t|
|
||||
t.column :project_id, :integer, :null => false
|
||||
t.column :user_id, :integer, :null => false
|
||||
t.column :issue_id, :integer
|
||||
t.column :hours, :float, :null => false
|
||||
t.column :comments, :string, :limit => 255
|
||||
t.column :activity_id, :integer, :null => false
|
||||
t.column :spent_on, :date, :null => false
|
||||
t.column :tyear, :integer, :null => false
|
||||
t.column :tmonth, :integer, :null => false
|
||||
t.column :tweek, :integer, :null => false
|
||||
t.column :created_on, :datetime, :null => false
|
||||
t.column :updated_on, :datetime, :null => false
|
||||
end
|
||||
add_index :time_entries, [:project_id], :name => :time_entries_project_id
|
||||
add_index :time_entries, [:issue_id], :name => :time_entries_issue_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :time_entries
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddTimelogPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "timelog", :action => "edit", :description => "button_log_time", :sort => 1520, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('timelog', 'edit').destroy
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class CreateChangesets < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :changesets do |t|
|
||||
t.column :repository_id, :integer, :null => false
|
||||
t.column :revision, :integer, :null => false
|
||||
t.column :committer, :string, :limit => 30
|
||||
t.column :committed_on, :datetime, :null => false
|
||||
t.column :comments, :text
|
||||
end
|
||||
add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :changesets
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class CreateChanges < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :changes do |t|
|
||||
t.column :changeset_id, :integer, :null => false
|
||||
t.column :action, :string, :limit => 1, :default => "", :null => false
|
||||
t.column :path, :string, :default => "", :null => false
|
||||
t.column :from_path, :string
|
||||
t.column :from_revision, :integer
|
||||
end
|
||||
add_index :changes, [:changeset_id], :name => :changesets_changeset_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :changes
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class AddChangesetCommitDate < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :changesets, :commit_date, :date
|
||||
Changeset.update_all "commit_date = committed_on"
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :changesets, :commit_date
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddProjectIdentifier < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :projects, :identifier, :string, :limit => 20
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :projects, :identifier
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddCustomFieldIsFilter < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :custom_fields, :is_filter, :boolean, :null => false, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :custom_fields, :is_filter
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class CreateWatchers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :watchers do |t|
|
||||
t.column :watchable_type, :string, :default => "", :null => false
|
||||
t.column :watchable_id, :integer, :default => 0, :null => false
|
||||
t.column :user_id, :integer
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :watchers
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class CreateChangesetsIssues < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :changesets_issues, :id => false do |t|
|
||||
t.column :changeset_id, :integer, :null => false
|
||||
t.column :issue_id, :integer, :null => false
|
||||
end
|
||||
add_index :changesets_issues, [:changeset_id, :issue_id], :unique => true, :name => :changesets_issues_ids
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :changesets_issues
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class RenameCommentToComments < ActiveRecord::Migration
|
||||
def self.up
|
||||
rename_column(:comments, :comment, :comments) if ActiveRecord::Base.connection.columns(Comment.table_name).detect{|c| c.name == "comment"}
|
||||
rename_column(:wiki_contents, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.table_name).detect{|c| c.name == "comment"}
|
||||
rename_column(:wiki_content_versions, :comment, :comments) if ActiveRecord::Base.connection.columns(WikiContent.versioned_table_name).detect{|c| c.name == "comment"}
|
||||
rename_column(:time_entries, :comment, :comments) if ActiveRecord::Base.connection.columns(TimeEntry.table_name).detect{|c| c.name == "comment"}
|
||||
rename_column(:changesets, :comment, :comments) if ActiveRecord::Base.connection.columns(Changeset.table_name).detect{|c| c.name == "comment"}
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class CreateIssueRelations < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :issue_relations do |t|
|
||||
t.column :issue_from_id, :integer, :null => false
|
||||
t.column :issue_to_id, :integer, :null => false
|
||||
t.column :relation_type, :string, :default => "", :null => false
|
||||
t.column :delay, :integer
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :issue_relations
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class AddRelationsPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "issue_relations", :action => "new", :description => "label_relation_new", :sort => 1080, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "issue_relations", :action => "destroy", :description => "label_relation_delete", :sort => 1085, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action("issue_relations", "new").destroy
|
||||
Permission.find_by_controller_and_action("issue_relations", "destroy").destroy
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class SetLanguageLengthToFive < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :users, :language, :string, :limit => 5, :default => ""
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
class CreateBoards < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :boards do |t|
|
||||
t.column :project_id, :integer, :null => false
|
||||
t.column :name, :string, :default => "", :null => false
|
||||
t.column :description, :string
|
||||
t.column :position, :integer, :default => 1
|
||||
t.column :topics_count, :integer, :default => 0, :null => false
|
||||
t.column :messages_count, :integer, :default => 0, :null => false
|
||||
t.column :last_message_id, :integer
|
||||
end
|
||||
add_index :boards, [:project_id], :name => :boards_project_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :boards
|
||||
end
|
||||
end
|
|
@ -1,21 +0,0 @@
|
|||
class CreateMessages < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :messages do |t|
|
||||
t.column :board_id, :integer, :null => false
|
||||
t.column :parent_id, :integer
|
||||
t.column :title, :string, :default => "", :null => false
|
||||
t.column :content, :text
|
||||
t.column :author_id, :integer
|
||||
t.column :replies_count, :integer, :default => 0, :null => false
|
||||
t.column :last_reply_id, :integer
|
||||
t.column :created_on, :datetime, :null => false
|
||||
t.column :updated_on, :datetime, :null => false
|
||||
end
|
||||
add_index :messages, [:board_id], :name => :messages_board_id
|
||||
add_index :messages, [:parent_id], :name => :messages_parent_id
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :messages
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class AddBoardsPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => "boards", :action => "new", :description => "button_add", :sort => 2000, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "boards", :action => "edit", :description => "button_edit", :sort => 2005, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => "boards", :action => "destroy", :description => "button_delete", :sort => 2010, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action("boards", "new").destroy
|
||||
Permission.find_by_controller_and_action("boards", "edit").destroy
|
||||
Permission.find_by_controller_and_action("boards", "destroy").destroy
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AllowNullVersionEffectiveDate < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :versions, :effective_date, :date, :default => nil, :null => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddWikiDestroyPagePermission < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => 'wiki', :action => 'destroy', :description => 'button_delete', :sort => 1740, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('wiki', 'destroy').destroy
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class AddWikiAttachmentsPermissions < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => 'wiki', :action => 'add_attachment', :description => 'label_attachment_new', :sort => 1750, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
Permission.create :controller => 'wiki', :action => 'destroy_attachment', :description => 'label_attachment_delete', :sort => 1755, :is_public => false, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('wiki', 'add_attachment').destroy
|
||||
Permission.find_by_controller_and_action('wiki', 'destroy_attachment').destroy
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddProjectStatus < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :projects, :status, :integer, :default => 1, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :projects, :status
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddChangesRevision < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :changes, :revision, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :changes, :revision
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddChangesBranch < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :changes, :branch, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :changes, :branch
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddChangesetsScmid < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :changesets, :scmid, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :changesets, :scmid
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddRepositoriesType < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :repositories, :type, :string
|
||||
# Set class name for existing SVN repositories
|
||||
Repository.update_all "type = 'Subversion'"
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :repositories, :type
|
||||
end
|
||||
end
|
|
@ -1,12 +0,0 @@
|
|||
class AddRepositoriesChangesPermission < ActiveRecord::Migration
|
||||
# model removed
|
||||
class Permission < ActiveRecord::Base; end
|
||||
|
||||
def self.up
|
||||
Permission.create :controller => 'repositories', :action => 'changes', :description => 'label_change_plural', :sort => 1475, :is_public => true, :mail_option => 0, :mail_enabled => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
Permission.find_by_controller_and_action('repositories', 'changes').destroy
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddVersionsWikiPageTitle < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :versions, :wiki_page_title, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :versions, :wiki_page_title
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddIssueCategoriesAssignedToId < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :issue_categories, :assigned_to_id, :integer
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :issue_categories, :assigned_to_id
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddRolesAssignable < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :roles, :assignable, :boolean, :default => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :roles, :assignable
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeChangesetsCommitterLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :changesets, :committer, :string, :limit => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :changesets, :committer, :string, :limit => 30
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddRolesBuiltin < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :roles, :builtin, :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :roles, :builtin
|
||||
end
|
||||
end
|
|
@ -1,16 +0,0 @@
|
|||
class InsertBuiltinRoles < ActiveRecord::Migration
|
||||
def self.up
|
||||
Role.reset_column_information
|
||||
nonmember = Role.new(:name => 'Non member', :position => 0)
|
||||
nonmember.builtin = Role::BUILTIN_NON_MEMBER
|
||||
nonmember.save
|
||||
|
||||
anonymous = Role.new(:name => 'Anonymous', :position => 0)
|
||||
anonymous.builtin = Role::BUILTIN_ANONYMOUS
|
||||
anonymous.save
|
||||
end
|
||||
|
||||
def self.down
|
||||
Role.destroy_all 'builtin <> 0'
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddRolesPermissions < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :roles, :permissions, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :roles, :permissions
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class DropPermissions < ActiveRecord::Migration
|
||||
def self.up
|
||||
drop_table :permissions
|
||||
drop_table :permissions_roles
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,11 +0,0 @@
|
|||
class AddSettingsUpdatedOn < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :settings, :updated_on, :timestamp
|
||||
# set updated_on
|
||||
Setting.all.each(&:save)
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :settings, :updated_on
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddCustomValueCustomizedIndex < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :custom_values, [:customized_type, :customized_id], :name => :custom_values_customized
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index :custom_values, :name => :custom_values_customized
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
class CreateWikiRedirects < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :wiki_redirects do |t|
|
||||
t.column :wiki_id, :integer, :null => false
|
||||
t.column :title, :string
|
||||
t.column :redirects_to, :string
|
||||
t.column :created_on, :datetime, :null => false
|
||||
end
|
||||
add_index :wiki_redirects, [:wiki_id, :title], :name => :wiki_redirects_wiki_id_title
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :wiki_redirects
|
||||
end
|
||||
end
|
|
@ -1,18 +0,0 @@
|
|||
class CreateEnabledModules < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :enabled_modules do |t|
|
||||
t.column :project_id, :integer
|
||||
t.column :name, :string, :null => false
|
||||
end
|
||||
add_index :enabled_modules, [:project_id], :name => :enabled_modules_project_id
|
||||
|
||||
# Enable all modules for existing projects
|
||||
Project.all.each do |project|
|
||||
project.enabled_module_names = Redmine::AccessControl.available_project_modules
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :enabled_modules
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddIssuesEstimatedHours < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :issues, :estimated_hours, :float
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :issues, :estimated_hours
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeAttachmentsContentTypeLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :attachments, :content_type, :string, :limit => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :attachments, :content_type, :string, :limit => 60
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddQueriesColumnNames < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :queries, :column_names, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :queries, :column_names
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
class AddEnumerationsPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column(:enumerations, :position, :integer, :default => 1) unless Enumeration.column_names.include?('position')
|
||||
Enumeration.all.group_by(&:opt).each do |opt, enums|
|
||||
enums.each_with_index do |enum, i|
|
||||
# do not call model callbacks
|
||||
Enumeration.update_all "position = #{i+1}", {:id => enum.id}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :enumerations, :position
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddEnumerationsIsDefault < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :enumerations, :is_default, :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :enumerations, :is_default
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddAuthSourcesTls < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :auth_sources, :tls, :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :auth_sources, :tls
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddMembersMailNotification < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :members, :mail_notification, :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :members, :mail_notification
|
||||
end
|
||||
end
|
|
@ -1,14 +0,0 @@
|
|||
class AllowNullPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
# removes the 'not null' constraint on position fields
|
||||
change_column :issue_statuses, :position, :integer, :default => 1, :null => true
|
||||
change_column :roles, :position, :integer, :default => 1, :null => true
|
||||
change_column :trackers, :position, :integer, :default => 1, :null => true
|
||||
change_column :boards, :position, :integer, :default => 1, :null => true
|
||||
change_column :enumerations, :position, :integer, :default => 1, :null => true
|
||||
end
|
||||
|
||||
def self.down
|
||||
# nothing to do
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class RemoveIssueStatusesHtmlColor < ActiveRecord::Migration
|
||||
def self.up
|
||||
remove_column :issue_statuses, :html_color
|
||||
end
|
||||
|
||||
def self.down
|
||||
raise IrreversibleMigration
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
class AddCustomFieldsPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column(:custom_fields, :position, :integer, :default => 1)
|
||||
CustomField.all.group_by(&:type).each do |t, fields|
|
||||
fields.each_with_index do |field, i|
|
||||
# do not call model callbacks
|
||||
CustomField.update_all "position = #{i+1}", {:id => field.id}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :custom_fields, :position
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddUserPreferencesTimeZone < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :user_preferences, :time_zone, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :user_preferences, :time_zone
|
||||
end
|
||||
end
|
|
@ -1,10 +0,0 @@
|
|||
class AddUsersType < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :users, :type, :string
|
||||
User.update_all "type = 'User'"
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :users, :type
|
||||
end
|
||||
end
|
|
@ -1,19 +0,0 @@
|
|||
class CreateProjectsTrackers < ActiveRecord::Migration
|
||||
def self.up
|
||||
create_table :projects_trackers, :id => false do |t|
|
||||
t.column :project_id, :integer, :default => 0, :null => false
|
||||
t.column :tracker_id, :integer, :default => 0, :null => false
|
||||
end
|
||||
add_index :projects_trackers, :project_id, :name => :projects_trackers_project_id
|
||||
|
||||
# Associates all trackers to all projects (as it was before)
|
||||
tracker_ids = Tracker.all.collect(&:id)
|
||||
Project.all.each do |project|
|
||||
project.tracker_ids = tracker_ids
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
drop_table :projects_trackers
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddMessagesLocked < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :messages, :locked, :boolean, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :messages, :locked
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddMessagesSticky < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :messages, :sticky, :integer, :default => 0
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :messages, :sticky
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeAuthSourcesAccountLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :auth_sources, :account, :string, :limit => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :auth_sources, :account, :string, :limit => 60
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddRoleTrackerOldStatusIndexToWorkflows < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_index :workflows, [:role_id, :tracker_id, :old_status_id], :name => :wkfs_role_tracker_old_status
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_index(:workflows, :name => :wkfs_role_tracker_old_status); rescue
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddCustomFieldsSearchable < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :custom_fields, :searchable, :boolean, :default => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :custom_fields, :searchable
|
||||
end
|
||||
end
|
|
@ -1,8 +0,0 @@
|
|||
class ChangeProjectsDescriptionToText < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :projects, :description, :text, :null => true, :default => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddCustomFieldsDefaultValue < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :custom_fields, :default_value, :text
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :custom_fields, :default_value
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddAttachmentsDescription < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :attachments, :description, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :attachments, :description
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeVersionsNameLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :versions, :name, :string, :limit => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :versions, :name, :string, :limit => 30
|
||||
end
|
||||
end
|
|
@ -1,32 +0,0 @@
|
|||
class ChangeChangesetsRevisionToString < ActiveRecord::Migration
|
||||
def self.up
|
||||
# Some backends (eg. SQLServer 2012) do not support changing the type
|
||||
# of an indexed column so the index needs to be dropped first
|
||||
# BUT this index is renamed with some backends (at least SQLite3) for
|
||||
# some (unknown) reasons, thus we check for the other name as well
|
||||
# so we don't end up with 2 identical indexes
|
||||
if index_exists? :changesets, [:repository_id, :revision], :name => :changesets_repos_rev
|
||||
remove_index :changesets, :name => :changesets_repos_rev
|
||||
end
|
||||
if index_exists? :changesets, [:repository_id, :revision], :name => :altered_changesets_repos_rev
|
||||
remove_index :changesets, :name => :altered_changesets_repos_rev
|
||||
end
|
||||
|
||||
change_column :changesets, :revision, :string, :null => false
|
||||
|
||||
add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
|
||||
end
|
||||
|
||||
def self.down
|
||||
if index_exists? :changesets, :changesets_repos_rev
|
||||
remove_index :changesets, :name => :changesets_repos_rev
|
||||
end
|
||||
if index_exists? :changesets, [:repository_id, :revision], :name => :altered_changesets_repos_rev
|
||||
remove_index :changesets, :name => :altered_changesets_repos_rev
|
||||
end
|
||||
|
||||
change_column :changesets, :revision, :integer, :null => false
|
||||
|
||||
add_index :changesets, [:repository_id, :revision], :unique => true, :name => :changesets_repos_rev
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeChangesFromRevisionToString < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :changes, :from_revision, :string
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :changes, :from_revision, :integer
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddWikiPagesProtected < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :wiki_pages, :protected, :boolean, :default => false, :null => false
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :wiki_pages, :protected
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class ChangeProjectsHomepageLimit < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :projects, :homepage, :string, :limit => nil, :default => ''
|
||||
end
|
||||
|
||||
def self.down
|
||||
change_column :projects, :homepage, :string, :limit => 60, :default => ''
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddWikiPagesParentId < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :wiki_pages, :parent_id, :integer, :default => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :wiki_pages, :parent_id
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class AddCommitAccessPermission < ActiveRecord::Migration
|
||||
def self.up
|
||||
Role.all.select { |r| not r.builtin? }.each do |r|
|
||||
r.add_permission!(:commit_access)
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
Role.all.select { |r| not r.builtin? }.each do |r|
|
||||
r.remove_permission!(:commit_access)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class AddViewWikiEditsPermission < ActiveRecord::Migration
|
||||
def self.up
|
||||
Role.all.each do |r|
|
||||
r.add_permission!(:view_wiki_edits) if r.has_permission?(:view_wiki_pages)
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
Role.all.each do |r|
|
||||
r.remove_permission!(:view_wiki_edits)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,15 +0,0 @@
|
|||
class SetTopicAuthorsAsWatchers < ActiveRecord::Migration
|
||||
def self.up
|
||||
# Sets active users who created/replied a topic as watchers of the topic
|
||||
# so that the new watch functionality at topic level doesn't affect notifications behaviour
|
||||
Message.connection.execute("INSERT INTO #{Watcher.table_name} (watchable_type, watchable_id, user_id)" +
|
||||
" SELECT DISTINCT 'Message', COALESCE(m.parent_id, m.id), m.author_id" +
|
||||
" FROM #{Message.table_name} m, #{User.table_name} u" +
|
||||
" WHERE m.author_id = u.id AND u.status = 1")
|
||||
end
|
||||
|
||||
def self.down
|
||||
# Removes all message watchers
|
||||
Watcher.delete_all("watchable_type = 'Message'")
|
||||
end
|
||||
end
|
|
@ -1,13 +0,0 @@
|
|||
class AddDeleteWikiPagesAttachmentsPermission < ActiveRecord::Migration
|
||||
def self.up
|
||||
Role.all.each do |r|
|
||||
r.add_permission!(:delete_wiki_pages_attachments) if r.has_permission?(:edit_wiki_pages)
|
||||
end
|
||||
end
|
||||
|
||||
def self.down
|
||||
Role.all.each do |r|
|
||||
r.remove_permission!(:delete_wiki_pages_attachments)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -1,9 +0,0 @@
|
|||
class AddChangesetsUserId < ActiveRecord::Migration
|
||||
def self.up
|
||||
add_column :changesets, :user_id, :integer, :default => nil
|
||||
end
|
||||
|
||||
def self.down
|
||||
remove_column :changesets, :user_id
|
||||
end
|
||||
end
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue