mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Update migration
This commit is contained in:
parent
e6f74fc6ab
commit
8a6156a56c
1 changed files with 11 additions and 2 deletions
|
|
@ -1,8 +1,17 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
class AddSharingFieldsToStats < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_column :stats, :sharing_settings, :jsonb, default: {}
|
||||
disable_ddl_transaction!
|
||||
|
||||
def up
|
||||
add_column :stats, :sharing_settings, :jsonb
|
||||
add_column :stats, :sharing_uuid, :uuid
|
||||
|
||||
change_column_default :stats, :sharing_settings, {}
|
||||
end
|
||||
|
||||
def down
|
||||
remove_column :stats, :sharing_settings
|
||||
remove_column :stats, :sharing_uuid
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in a new issue