mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-11 01:31:39 -05:00
Merge pull request #1761 from Freika/fix/stat-sharing-migration
Update migration
This commit is contained in:
commit
bab666b182
1 changed files with 11 additions and 2 deletions
|
|
@ -1,8 +1,17 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
class AddSharingFieldsToStats < ActiveRecord::Migration[8.0]
|
class AddSharingFieldsToStats < ActiveRecord::Migration[8.0]
|
||||||
def change
|
disable_ddl_transaction!
|
||||||
add_column :stats, :sharing_settings, :jsonb, default: {}
|
|
||||||
|
def up
|
||||||
|
add_column :stats, :sharing_settings, :jsonb
|
||||||
add_column :stats, :sharing_uuid, :uuid
|
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
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue