BigW Consortium Gitlab

Commit b3dc4fb7 by Andrew8xx8

Migrations to convert data added

parent 3b6228dc
class AddPrivateToSnippets < ActiveRecord::Migration class AddPrivateToSnippets < ActiveRecord::Migration
def change def change
add_column :snippets, :private, :boolean add_column :snippets, :private, :boolean, null: false, default: true
end end
end end
class AddTypeValueForSnippets < ActiveRecord::Migration
def up
Snippet.where("project_id IS NOT NULL").update_all(type: 'ProjectSnippet')
end
def down
end
end
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
# #
# It's strongly recommended to check this file into your version control system. # It's strongly recommended to check this file into your version control system.
ActiveRecord::Schema.define(:version => 20130324172327) do ActiveRecord::Schema.define(:version => 20130324203535) do
create_table "events", :force => true do |t| create_table "events", :force => true do |t|
t.string "target_type" t.string "target_type"
...@@ -190,7 +190,7 @@ ActiveRecord::Schema.define(:version => 20130324172327) do ...@@ -190,7 +190,7 @@ ActiveRecord::Schema.define(:version => 20130324172327) do
t.datetime "updated_at", :null => false t.datetime "updated_at", :null => false
t.string "file_name" t.string "file_name"
t.datetime "expires_at" t.datetime "expires_at"
t.boolean "private" t.boolean "private", :default => true, :null => false
t.string "type" t.string "type"
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment