diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-03-06 16:39:20 +0200 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-03-10 12:23:11 +0200 |
commit | ed4c7190ed47f0311ba5f5a140b2c71a694b05db (patch) | |
tree | e963827cb3d42964f33a02b5975c229fb28a8445 /db | |
parent | e0caed91e2cd6b959f808139df7c40f3644f88fd (diff) | |
download | gitlab-ce-ed4c7190ed47f0311ba5f5a140b2c71a694b05db.tar.gz |
Fix importers with OCC
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20150306023112_add_unique_index_to_namespace.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 8 |
2 files changed, 13 insertions, 4 deletions
diff --git a/db/migrate/20150306023112_add_unique_index_to_namespace.rb b/db/migrate/20150306023112_add_unique_index_to_namespace.rb new file mode 100644 index 00000000000..b1f7822b4dc --- /dev/null +++ b/db/migrate/20150306023112_add_unique_index_to_namespace.rb @@ -0,0 +1,9 @@ +class AddUniqueIndexToNamespace < ActiveRecord::Migration + def change + remove_index :namespaces, :name + remove_index :namespaces, :path + + add_index :namespaces, :name, unique: true + add_index :namespaces, :path, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index a686bb4b3cd..3afbc082b70 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: 20150225065047) do +ActiveRecord::Schema.define(version: 20150306023112) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -242,9 +242,9 @@ ActiveRecord::Schema.define(version: 20150225065047) do end add_index "namespaces", ["created_at", "id"], name: "index_namespaces_on_created_at_and_id", using: :btree - add_index "namespaces", ["name"], name: "index_namespaces_on_name", using: :btree + add_index "namespaces", ["name"], name: "index_namespaces_on_name", unique: true, using: :btree add_index "namespaces", ["owner_id"], name: "index_namespaces_on_owner_id", using: :btree - add_index "namespaces", ["path"], name: "index_namespaces_on_path", using: :btree + add_index "namespaces", ["path"], name: "index_namespaces_on_path", unique: true, using: :btree add_index "namespaces", ["type"], name: "index_namespaces_on_type", using: :btree create_table "notes", force: true do |t| @@ -334,12 +334,12 @@ ActiveRecord::Schema.define(version: 20150225065047) do t.string "import_url" t.integer "visibility_level", default: 0, null: false t.boolean "archived", default: false, null: false - t.string "avatar" t.string "import_status" t.float "repository_size", default: 0.0 t.integer "star_count", default: 0, null: false t.string "import_type" t.string "import_source" + t.string "avatar" end add_index "projects", ["created_at", "id"], name: "index_projects_on_created_at_and_id", using: :btree |