parent
191a405896
commit
a74d34a071
@ -0,0 +1,10 @@
|
||||
class AddUserRefToRepository < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :repositories, :user_id, :integer
|
||||
add_index :repositories, :user_id
|
||||
|
||||
Project.joins(:repository).find_each do |project|
|
||||
project&.repository&.update_column(:user_id, project&.user_id) unless project&.repository.blank?
|
||||
end
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddGiteaUidToUsers < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :users, :gitea_uid, :integer
|
||||
end
|
||||
end
|
@ -0,0 +1,5 @@
|
||||
class AddMirrorUrlToRepositories < ActiveRecord::Migration[5.2]
|
||||
def change
|
||||
add_column :repositories, :mirror_url, :string
|
||||
end
|
||||
end
|
Loading…
Reference in new issue