mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
Merge pull request '代码仓库同步部分代码' (#282) from reposync_feature into standalone_develop
This commit is contained in:
14
db/migrate/20240415014011_create_sync_repositories.rb
Normal file
14
db/migrate/20240415014011_create_sync_repositories.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateSyncRepositories < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :sync_repositories do |t|
|
||||
t.references :project
|
||||
t.string :type
|
||||
t.string :repo_name
|
||||
t.string :external_repo_address
|
||||
t.integer :sync_granularity
|
||||
t.integer :sync_direction, comment: "1表示从gitlink到外部2表示从外部到gitlink"
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
14
db/migrate/20240415015216_create_sync_repository_branches.rb
Normal file
14
db/migrate/20240415015216_create_sync_repository_branches.rb
Normal file
@@ -0,0 +1,14 @@
|
||||
class CreateSyncRepositoryBranches < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
create_table :sync_repository_branches do |t|
|
||||
t.references :sync_repository
|
||||
t.string :gitlink_branch_name, comment: 'gitlink分支'
|
||||
t.string :external_branch_name, comment: '外部仓库分支'
|
||||
t.datetime :sync_time
|
||||
t.integer :sync_status, default: 0
|
||||
t.integer :reposync_branch_id
|
||||
|
||||
t.timestamps
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddEnableToSyncRepositoryBranch < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :sync_repository_branches, :enable, :boolean, default: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddExternalTokenToSyncRepository < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :sync_repositories, :external_token, :string
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class AddWebhookGidToSyncRepository < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :sync_repositories, :webhook_gid, :integer
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user