Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorSean McGivern <sean@mcgivern.me.uk>2017-04-06 14:02:13 +0300
committerSean McGivern <sean@mcgivern.me.uk>2017-04-06 14:02:13 +0300
commit618542949573ddf1636f6e28a72866105d5dbd37 (patch)
tree1ab6438f86a2dd427e79ee4ad1c42acadf9d247c /db
parentdc20dd1b3d69bfcd503f4dfe1b89f49bf7083844 (diff)
parent94716c279f35c787d5b41ed626ad9bfc1acf83aa (diff)
Merge branch 'fix/gh-import-status-check' into 'master'
Periodically mark projects that are stuck in importing as failed Closes #17709 See merge request !10207
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170130204620_add_index_to_project_authorizations.rb4
-rw-r--r--db/migrate/20170405080720_add_import_jid_to_projects.rb9
-rw-r--r--db/schema.rb3
3 files changed, 14 insertions, 2 deletions
diff --git a/db/migrate/20170130204620_add_index_to_project_authorizations.rb b/db/migrate/20170130204620_add_index_to_project_authorizations.rb
index aded62e08b3..f256251516a 100644
--- a/db/migrate/20170130204620_add_index_to_project_authorizations.rb
+++ b/db/migrate/20170130204620_add_index_to_project_authorizations.rb
@@ -7,7 +7,9 @@ class AddIndexToProjectAuthorizations < ActiveRecord::Migration
disable_ddl_transaction!
def up
- add_concurrent_index(:project_authorizations, :project_id)
+ unless index_exists?(:project_authorizations, :project_id)
+ add_concurrent_index(:project_authorizations, :project_id)
+ end
end
def down
diff --git a/db/migrate/20170405080720_add_import_jid_to_projects.rb b/db/migrate/20170405080720_add_import_jid_to_projects.rb
new file mode 100644
index 00000000000..55b87b9d56d
--- /dev/null
+++ b/db/migrate/20170405080720_add_import_jid_to_projects.rb
@@ -0,0 +1,9 @@
+class AddImportJidToProjects < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column :projects, :import_jid, :string
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index ccf18d07179..582f68cbee7 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20170402231018) do
+ActiveRecord::Schema.define(version: 20170405080720) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -920,6 +920,7 @@ ActiveRecord::Schema.define(version: 20170402231018) do
t.text "description_html"
t.boolean "only_allow_merge_if_all_discussions_are_resolved"
t.boolean "printing_merge_request_link_enabled", default: true, null: false
+ t.string "import_jid"
end
add_index "projects", ["ci_id"], name: "index_projects_on_ci_id", using: :btree