fix: repeat table name
This commit is contained in:
parent
7c43f2d8fc
commit
1126b404eb
|
@ -17,6 +17,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class AppliedMessage < ApplicationRecord
|
class AppliedMessage < ApplicationRecord
|
||||||
|
self.table_name = "forge_applied_messages"
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :applied, polymorphic: true
|
belongs_to :applied, polymorphic: true
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
|
@ -12,6 +12,8 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
class AppliedProject < ApplicationRecord
|
class AppliedProject < ApplicationRecord
|
||||||
|
self.table_name = "forge_applied_projects"
|
||||||
|
|
||||||
belongs_to :user
|
belongs_to :user
|
||||||
belongs_to :project
|
belongs_to :project
|
||||||
|
|
||||||
|
|
|
@ -61,6 +61,7 @@
|
||||||
#
|
#
|
||||||
# index_projects_on_forked_from_project_id (forked_from_project_id)
|
# index_projects_on_forked_from_project_id (forked_from_project_id)
|
||||||
# index_projects_on_identifier (identifier)
|
# index_projects_on_identifier (identifier)
|
||||||
|
# index_projects_on_invite_code (invite_code)
|
||||||
# index_projects_on_is_public (is_public)
|
# index_projects_on_is_public (is_public)
|
||||||
# index_projects_on_lft (lft)
|
# index_projects_on_lft (lft)
|
||||||
# index_projects_on_name (name)
|
# index_projects_on_name (name)
|
||||||
|
@ -74,6 +75,7 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class Project < ApplicationRecord
|
class Project < ApplicationRecord
|
||||||
include Matchable
|
include Matchable
|
||||||
include Publicable
|
include Publicable
|
||||||
|
|
|
@ -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
|
||||||
|
t.integer :status
|
||||||
|
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
|
||||||
|
t.integer :status
|
||||||
|
|
||||||
|
t.timestamps
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
Loading…
Reference in New Issue