mirror of
https://github.com/discourse/discourse.git
synced 2025-06-01 17:40:43 +08:00
Allow categories with null position, which means sort them based on activity. Mix absolutely positioned (position is not null) categories with null position categories.
This commit is contained in:
@ -0,0 +1,10 @@
|
||||
class MakePositionNullableInCategories < ActiveRecord::Migration
|
||||
def up
|
||||
change_column :categories, :position, :integer, null: true
|
||||
end
|
||||
|
||||
def down
|
||||
execute "update categories set position=0 where position is null"
|
||||
change_column :categories, :position, :integer, null: false
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user