mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-11-16 06:06:56 +08:00
19 lines
632 B
Ruby
19 lines
632 B
Ruby
|
# frozen_string_literal: true
|
||
|
|
||
|
class AddShareableLinks < ActiveRecord::Migration[6.1]
|
||
|
def change
|
||
|
create_table :shareable_links do |t|
|
||
|
t.string :signed_id, 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
|