You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
19 lines
638 B
19 lines
638 B
class CreateAnnotations < ActiveRecord::Migration[6.1] |
|
def change |
|
create_table :annotations do |t| |
|
t.references :doctrine, null: false |
|
t.references :document, null: false, polymorphic: true |
|
t.references :annomark, null: false |
|
t.string :phil_rep, null: false, default: "" |
|
t.text :editor_notes, null: false, default: "" |
|
t.integer :rank, null: false, default: 1 |
|
|
|
t.timestamps |
|
end |
|
|
|
add_index :annotations, |
|
%i[doctrine_id annomark_id document_id document_type phil_rep], |
|
name: "index_annotation_uniqueness", |
|
unique: true |
|
end |
|
end
|
|
|