X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8980da4381923d8099a11a1334baf3c3e625a484..0425aeebbcf511b6b3627c5a3ba8f5066c80660b:/db/migrate/20110322001319_add_terms_seen_to_user.rb?ds=sidebyside diff --git a/db/migrate/20110322001319_add_terms_seen_to_user.rb b/db/migrate/20110322001319_add_terms_seen_to_user.rb index 8178c1592..824eaceb0 100644 --- a/db/migrate/20110322001319_add_terms_seen_to_user.rb +++ b/db/migrate/20110322001319_add_terms_seen_to_user.rb @@ -1,7 +1,10 @@ -class AddTermsSeenToUser < ActiveRecord::Migration +class AddTermsSeenToUser < ActiveRecord::Migration[4.2] + class User < ApplicationRecord + end + def self.up add_column :users, :terms_seen, :boolean, :null => false, :default => false - + # best guess available is just that everyone who has agreed has # seen the terms, and that noone else has. User.update_all "terms_seen = (terms_agreed is not null)"