Commit Graph
3 Commits
Author SHA1 Message Date
Dmitriy ZaporozhetsandMarin Jankovski 956a392a21 Merge branch 'fix_importers' into 'master'
Fix importers with OCC

Fixes https://gitlab.com/gitlab-org/gitlab-ce/issues/1180

Using validates_uniqueness_of does not guarantee the absence of duplicate record insertions. When users click button "import all" it will create duplicating group in database and data integrity will be broken.

http://api.rubyonrails.org/classes/ActiveRecord/Validations/ClassMethods.html#method-i-validates_uniqueness_of

I use optimistic concurrency control for handling this situation.

See merge request !1647

Conflicts:
	db/schema.rb
2015-03-11 11:31:15 -07:00
Dmitriy ZaporozhetsandMarin Jankovski 520a49d325 Merge branch 'case-sensetivity-import' into 'master'
Fix import check for case sensetive namespaces

If you already have namespace `ABc` and you try to import project with namespace `abC` - import will fail with 422 error.

cc @valery

See merge request !1618
2015-03-04 10:15:02 -08:00
Valery Sizov 1ac20698a5 gitlab.com importer: refactorig 2015-02-05 17:03:43 -08:00