forked from Gitlink/forgeplus
fix: repeat table name
This commit is contained in:
parent
7c43f2d8fc
commit
2682d60717
|
@ -17,6 +17,7 @@
|
|||
#
|
||||
|
||||
class AppliedMessage < ApplicationRecord
|
||||
self.table_name = 'forge_applied_messages'
|
||||
belongs_to :user
|
||||
belongs_to :applied, polymorphic: true
|
||||
belongs_to :project
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
#
|
||||
|
||||
class AppliedProject < ApplicationRecord
|
||||
self.table_name = "forge_applied_projects"
|
||||
belongs_to :user
|
||||
belongs_to :project
|
||||
|
||||
|
|
|
@ -0,0 +1,25 @@
|
|||
class CreateForgeRepeatTables < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :forge_applied_message do |t|
|
||||
t.references :user
|
||||
t.references :applied, polymorphic: true
|
||||
t.integer :viewed, default: 0
|
||||
t.integer :status , default: 0
|
||||
t.string :name
|
||||
t.references :applied_user
|
||||
t.integer :role
|
||||
t.references :project
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
|
||||
create_table :forge_applied_projects do |t|
|
||||
t.references :project
|
||||
t.references :user
|
||||
t.integer :role, default: 0
|
||||
t.integer :status, default: 0
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue