mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-29 05:18:49 +01:00
Give the Context.state column a default value of 'active'
SQLite does not permit a NOT NULL column to have default value NULL.
This commit is contained in:
parent
ae42f9c076
commit
560f2ff538
1 changed files with 1 additions and 1 deletions
|
|
@ -4,7 +4,7 @@ class AddStateToContext < ActiveRecord::Migration
|
|||
end
|
||||
|
||||
def up
|
||||
add_column :contexts, :state, :string, :limit => 20, :null => false
|
||||
add_column :contexts, :state, :string, :limit => 20, :null => false, :default => 'active'
|
||||
Context.reset_column_information
|
||||
Context.all.each do |c|
|
||||
c.state = c.hide ? 'hidden' : 'active'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue