summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-17 14:01:33 +0000
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-04-17 17:34:48 +0300
commit8b4b687d445236766c168a844b856d8c09efe1a2 (patch)
tree5629c26b947a5a2a0c23e43e918912f7855f6a08 /db
parent047dacc7001cc658031914c668111ba42ac9944e (diff)
downloadgitlab-ce-8b4b687d445236766c168a844b856d8c09efe1a2.tar.gz
Merge branch 'google-code-import-performance' into 'master'
Decrease memory use and increase performance of Google Code importer. Addresses private issue https://dev.gitlab.org/gitlab/gitlabhq/issues/2241. See merge request !536
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20150417121913_create_project_import_data.rb8
-rw-r--r--db/migrate/20150417122318_remove_import_data_from_project.rb5
-rw-r--r--db/schema.rb8
3 files changed, 19 insertions, 2 deletions
diff --git a/db/migrate/20150417121913_create_project_import_data.rb b/db/migrate/20150417121913_create_project_import_data.rb
new file mode 100644
index 00000000000..c78f5fde85e
--- /dev/null
+++ b/db/migrate/20150417121913_create_project_import_data.rb
@@ -0,0 +1,8 @@
+class CreateProjectImportData < ActiveRecord::Migration
+ def change
+ create_table :project_import_data do |t|
+ t.references :project
+ t.text :data
+ end
+ end
+end
diff --git a/db/migrate/20150417122318_remove_import_data_from_project.rb b/db/migrate/20150417122318_remove_import_data_from_project.rb
new file mode 100644
index 00000000000..c275b49d228
--- /dev/null
+++ b/db/migrate/20150417122318_remove_import_data_from_project.rb
@@ -0,0 +1,5 @@
+class RemoveImportDataFromProject < ActiveRecord::Migration
+ def change
+ remove_column :projects, :import_data
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 0b91f9c467e..1aee37b2e61 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: 20150413192223) do
+ActiveRecord::Schema.define(version: 20150417122318) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -323,6 +323,11 @@ ActiveRecord::Schema.define(version: 20150413192223) do
add_index "oauth_applications", ["owner_id", "owner_type"], name: "index_oauth_applications_on_owner_id_and_owner_type", using: :btree
add_index "oauth_applications", ["uid"], name: "index_oauth_applications_on_uid", unique: true, using: :btree
+ create_table "project_import_data", force: true do |t|
+ t.integer "project_id"
+ t.text "data"
+ end
+
create_table "projects", force: true do |t|
t.string "name"
t.string "path"
@@ -348,7 +353,6 @@ ActiveRecord::Schema.define(version: 20150413192223) do
t.integer "star_count", default: 0, null: false
t.string "import_type"
t.string "import_source"
- t.text "import_data"
end
add_index "projects", ["created_at", "id"], name: "index_projects_on_created_at_and_id", using: :btree