diff --git a/db/migrate/20150510164222_change_users_default_asciicast_privacy_policy.rb b/db/migrate/20150510164222_change_users_default_asciicast_privacy_policy.rb new file mode 100644 index 0000000..1970e8f --- /dev/null +++ b/db/migrate/20150510164222_change_users_default_asciicast_privacy_policy.rb @@ -0,0 +1,10 @@ +class ChangeUsersDefaultAsciicastPrivacyPolicy < ActiveRecord::Migration + def up + change_column :users, :asciicasts_private_by_default, :boolean, default: true, null: false + execute "UPDATE users SET asciicasts_private_by_default = TRUE" + end + + def down + change_column :users, :asciicasts_private_by_default, :boolean, default: false, null: false + end +end diff --git a/db/schema.rb b/db/schema.rb index 8342bc9..cd0d2cd 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -11,7 +11,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20150510162214) do +ActiveRecord::Schema.define(version: 20150510164222) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -110,13 +110,13 @@ ActiveRecord::Schema.define(version: 20150510162214) do t.string "uid" t.string "email" t.string "name" - t.datetime "created_at", null: false - t.datetime "updated_at", null: false + t.datetime "created_at", null: false + t.datetime "updated_at", null: false t.string "username" t.string "auth_token" t.string "theme_name" t.string "temporary_username" - t.boolean "asciicasts_private_by_default", default: false, null: false + t.boolean "asciicasts_private_by_default", default: true, null: false end add_index "users", ["auth_token"], name: "index_users_on_auth_token", using: :btree