mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-02 19:30:48 +08:00
ADD gitea databse config
This commit is contained in:
12
app/libs/gitea/database.rb
Normal file
12
app/libs/gitea/database.rb
Normal file
@@ -0,0 +1,12 @@
|
||||
module Gitea
|
||||
class Database < ActiveRecord::Base
|
||||
self.abstract_class = true
|
||||
|
||||
def self.set_connection
|
||||
gitea_server_config = Rails.configuration.database_configuration[Rails.env]["gitea_server"]
|
||||
raise 'gitea database config missing' if gitea_server_config.blank?
|
||||
|
||||
establish_connection gitea_server_config
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user