##// END OF EJS Templates
Fixed: not null constraints not removed with Postgresql....
Jean-Philippe Lang -
r1126:a2626bbccf87
parent child
Show More
@@ -1,6 +1,6
1 class AllowNullVersionEffectiveDate < ActiveRecord::Migration
1 class AllowNullVersionEffectiveDate < ActiveRecord::Migration
2 def self.up
2 def self.up
3 change_column :versions, :effective_date, :date, :default => nil
3 change_column :versions, :effective_date, :date, :default => nil, :null => true
4 end
4 end
5
5
6 def self.down
6 def self.down
@@ -1,11 +1,11
1 class AllowNullPosition < ActiveRecord::Migration
1 class AllowNullPosition < ActiveRecord::Migration
2 def self.up
2 def self.up
3 # removes the 'not null' constraint on position fields
3 # removes the 'not null' constraint on position fields
4 change_column :issue_statuses, :position, :integer, :default => 1
4 change_column :issue_statuses, :position, :integer, :default => 1, :null => true
5 change_column :roles, :position, :integer, :default => 1
5 change_column :roles, :position, :integer, :default => 1, :null => true
6 change_column :trackers, :position, :integer, :default => 1
6 change_column :trackers, :position, :integer, :default => 1, :null => true
7 change_column :boards, :position, :integer, :default => 1
7 change_column :boards, :position, :integer, :default => 1, :null => true
8 change_column :enumerations, :position, :integer, :default => 1
8 change_column :enumerations, :position, :integer, :default => 1, :null => true
9 end
9 end
10
10
11 def self.down
11 def self.down
@@ -1,6 +1,6
1 class ChangeProjectsDescriptionToText < ActiveRecord::Migration
1 class ChangeProjectsDescriptionToText < ActiveRecord::Migration
2 def self.up
2 def self.up
3 change_column :projects, :description, :text
3 change_column :projects, :description, :text, :null => true
4 end
4 end
5
5
6 def self.down
6 def self.down
General Comments 0
You need to be logged in to leave comments. Login now