scinote-web/db/migrate/20230627091027_add_shareable_links.rb
ajugo 836d1b6be1
Add permissions for shareable links and some fixes for controller [SCI-8747] (#5709)
Add permissions for shareable links and som fixes for controller [SCI-8747]
2023-07-05 16:21:26 +02:00

18 lines
627 B
Ruby

# frozen_string_literal: true
class AddShareableLinks < ActiveRecord::Migration[6.1]
def change
create_table :shareable_links do |t|
t.string :uuid, index: true
t.string :description
t.references :shareable, polymorphic: true, index: true
t.references :team, index: true, foreign_key: { to_table: :teams }
t.references :created_by, index: true, foreign_key: { to_table: :users }
t.references :last_modified_by, index: true, foreign_key: { to_table: :users }
t.timestamps
end
add_column :teams, :shareable_links_enabled, :boolean, default: false, null: false
end
end