Merge pull request '代码仓库同步部分代码' (#282) from reposync_feature into standalone_develop

This commit is contained in:
2024-05-10 15:05:04 +08:00
33 changed files with 952 additions and 5 deletions

View 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

View 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

View File

@@ -0,0 +1,5 @@
class AddEnableToSyncRepositoryBranch < ActiveRecord::Migration[5.2]
def change
add_column :sync_repository_branches, :enable, :boolean, default: true
end
end

View File

@@ -0,0 +1,5 @@
class AddExternalTokenToSyncRepository < ActiveRecord::Migration[5.2]
def change
add_column :sync_repositories, :external_token, :string
end
end

View File

@@ -0,0 +1,5 @@
class AddWebhookGidToSyncRepository < ActiveRecord::Migration[5.2]
def change
add_column :sync_repositories, :webhook_gid, :integer
end
end