【发布时间】:2016-02-14 00:16:39
【问题描述】:
我刚刚将 gitlab(源代码)从 7.6 更新到 7.7.2,但出现了问题。
我点击了这个链接:https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/update/7.6-to-7.7.md
有步骤:
- 结帐版本:7-7-stable(之前,我运行结帐 -- db/schema.rb)
结帐版本完成后,我在 db/schema.rb 中看到有版本:
ActiveRecord::Schema.define(version: 20150116234544) do
和表:protected_branches 的列如下:
create_table "protected_branches", force: true do |t|
t.integer "project_id", null: false
t.string "name", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "developers_can_push", default: false, null: false
end
add_index "protected_branches", ["project_id"], name: "index_protected_branches_on_project_id", using: :btree
- 运行命令迁移数据库
bundle exec rake db:migrate RAILS_ENV=production
当我运行上面的命令时,我看到这个文件 db/schema.rb 在这个表 protected_branches 中不包含列 developers_can_push。这个文件的版本是:
ActiveRecord::Schema.define(version: 20150812080800) do
所以,当我再次启动 gitlab、nginx 时,我不会推送到 gitlab 服务器,因为出了点问题 - 此列 developer_can_push 不存在。
请帮我解决这个问题。
谢谢!
【问题讨论】:
标签: ruby-on-rails git postgresql centos gitlab