From 482ffe7d0ba9109abd14eebca57f93d105a6d067 Mon Sep 17 00:00:00 2001 From: Andreas Nedbal Date: Sun, 5 Feb 2023 18:00:30 +0100 Subject: [PATCH] Add migration to add sharing fields to users --- .../20230205145011_add_sharing_fields_to_user.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 db/migrate/20230205145011_add_sharing_fields_to_user.rb diff --git a/db/migrate/20230205145011_add_sharing_fields_to_user.rb b/db/migrate/20230205145011_add_sharing_fields_to_user.rb new file mode 100644 index 00000000..cc2edc44 --- /dev/null +++ b/db/migrate/20230205145011_add_sharing_fields_to_user.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class AddSharingFieldsToUser < ActiveRecord::Migration[6.1] + def up + add_column :users, :sharing_enabled, :boolean, default: false + add_column :users, :sharing_autoclose, :boolean, default: false + add_column :users, :sharing_custom_url, :string + end + + def down + remove_column :users, :sharing_enabled + remove_column :users, :sharing_autoclose + remove_column :users, :sharing_custom_url + end +end