summaryrefslogtreecommitdiffstats
path: root/db
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-01 08:11:36 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2015-11-01 08:11:36 +0000
commit9178d4748f19adee08e5b9d58ea1176836249eb6 (patch)
tree4c9ee2b9b5d57c31a1872610494e425f1b3a0df5 /db
parent786e3cff10f2c6989162f5dacc9547914dd09f76 (diff)
downloadredmine-9178d4748f19adee08e5b9d58ea1176836249eb6.tar.gz
redmine-9178d4748f19adee08e5b9d58ea1176836249eb6.zip
Default target version for new issues (#1828).
git-svn-id: http://svn.redmine.org/redmine/trunk@14786 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20151031095005_add_projects_default_version_id.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/db/migrate/20151031095005_add_projects_default_version_id.rb b/db/migrate/20151031095005_add_projects_default_version_id.rb
new file mode 100644
index 000000000..7d38f36cd
--- /dev/null
+++ b/db/migrate/20151031095005_add_projects_default_version_id.rb
@@ -0,0 +1,12 @@
+class AddProjectsDefaultVersionId < ActiveRecord::Migration
+ def self.up
+ # Don't try to add the column if redmine_default_version plugin was used
+ unless column_exists?(:projects, :default_version_id, :integer)
+ add_column :projects, :default_version_id, :integer, :default => nil
+ end
+ end
+
+ def self.down
+ remove_column :projects, :default_version_id
+ end
+end