OpenProject is the leading open source project management software.
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.
 
 
 
 
 
 
openproject/modules/bcf/db/migrate/20181214103300_add_bcf_plug...

35 lines
1.1 KiB

class AddBcfPlugin < ActiveRecord::Migration[5.1]
def change
create_table :bcf_issues do |t|
t.text :uuid, index: true
t.column :markup, :xml
t.references :project, foreign_key: { on_delete: :cascade }, index: true
t.references :work_package, foreign_key: { on_delete: :cascade }, index: { unique: true }
end
create_table :bcf_viewpoints do |t|
t.text :uuid, index: true
t.column :viewpoint, :xml
t.text :viewpoint_name
t.references :issue,
foreign_key: { to_table: :bcf_issues, on_delete: :cascade }
# Create unique index on issue and uuid to avoid duplicates on resynchronization
t.index %i[uuid issue_id], unique: true
end
create_table :bcf_comments do |t|
t.text :uuid, index: true
t.references :journal, index: true
t.references :issue,
foreign_key: { to_table: :bcf_issues, on_delete: :cascade },
index: true
# Create unique index on issue and uuid to avoid duplicates on resynchronization
t.index %i[uuid issue_id], unique: true
end
end
end