mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-25 03:30:13 +01:00
restored :integer as type for position. I've updated migration 038. If you have run it before this patch, you need to rerun it. rake db:migratie VERSION=37 to step back and rake db:migrate to rerun
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@729 a4c988fc-2ded-0310-b66e-134b36920a42
This commit is contained in:
parent
f587ad6228
commit
e71a3cbbae
2 changed files with 6 additions and 6 deletions
|
|
@ -1,7 +1,7 @@
|
|||
class ProjectsContextsRemoveNotNullFromPosition < ActiveRecord::Migration
|
||||
def self.up
|
||||
change_column :projects, :position, :string, :null => true
|
||||
change_column :contexts, :position, :string, :null => true
|
||||
change_column :projects, :position, :integer, {:null => true, :default => false}
|
||||
change_column :contexts, :position, :integer, {:null => true, :default => false}
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
|
@ -10,13 +10,13 @@ class ProjectsContextsRemoveNotNullFromPosition < ActiveRecord::Migration
|
|||
project.position = 0 if !project.position?
|
||||
project.save
|
||||
end
|
||||
change_column :projects, :position, :string, :null => false
|
||||
change_column :projects, :position, :integer, {:null => false, :default => false}
|
||||
|
||||
@contexts = Context.find(:all)
|
||||
@contexts.each do |context|
|
||||
context.position = 0 if !context.position?
|
||||
context.save
|
||||
end
|
||||
change_column :contexts, :position, :string, :null => false
|
||||
change_column :contexts, :position, :integer, {:null => false, :default => false}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ ActiveRecord::Schema.define(:version => 38) do
|
|||
|
||||
create_table "contexts", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "position", :string, :default => ""
|
||||
t.column "position", :integer, :default => 0
|
||||
t.column "hide", :boolean, :default => false
|
||||
t.column "user_id", :integer, :default => 1
|
||||
t.column "created_at", :datetime
|
||||
|
|
@ -69,7 +69,7 @@ ActiveRecord::Schema.define(:version => 38) do
|
|||
|
||||
create_table "projects", :force => true do |t|
|
||||
t.column "name", :string, :default => "", :null => false
|
||||
t.column "position", :string, :default => ""
|
||||
t.column "position", :integer, :default => 0
|
||||
t.column "user_id", :integer, :default => 1
|
||||
t.column "description", :text
|
||||
t.column "state", :string, :limit => 20, :default => "active", :null => false
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue