mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-01-31 08:59:08 +01:00
Add migration to add sharing fields to users
This commit is contained in:
parent
90335140c7
commit
482ffe7d0b
1 changed files with 15 additions and 0 deletions
15
db/migrate/20230205145011_add_sharing_fields_to_user.rb
Normal file
15
db/migrate/20230205145011_add_sharing_fields_to_user.rb
Normal file
|
@ -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
|
Loading…
Reference in a new issue