Commit 6f209c3ea12296050b5e941b82bd6ffd7dd7b55a

Authored by Diego Araújo
1 parent 42963265
Exists in colab and in 2 other branches master, stable

Add public field to repository attributes

Necessary to implement the feature of hiding repositories.
db/migrate/20160418192431_add_public_to_repository_attributes.rb 0 → 100644
... ... @@ -0,0 +1,5 @@
  1 +class AddPublicToRepositoryAttributes < ActiveRecord::Migration
  2 + def change
  3 + add_column :repository_attributes, :public, :boolean, default: true
  4 + end
  5 +end
... ...
db/schema.rb
... ... @@ -11,10 +11,7 @@
11 11 #
12 12 # It's strongly recommended that you check this file into your version control system.
13 13  
14   -ActiveRecord::Schema.define(version: 20151106182639) do
15   -
16   - # These are extensions that must be enabled in order to support this database
17   - enable_extension "plpgsql"
  14 +ActiveRecord::Schema.define(version: 20160418192431) do
18 15  
19 16 create_table "kalibro_configuration_attributes", force: :cascade do |t|
20 17 t.integer "user_id"
... ... @@ -44,11 +41,12 @@ ActiveRecord::Schema.define(version: 20151106182639) do
44 41 create_table "repository_attributes", force: :cascade do |t|
45 42 t.integer "repository_id"
46 43 t.integer "user_id"
47   - t.datetime "created_at", null: false
48   - t.datetime "updated_at", null: false
  44 + t.datetime "created_at", null: false
  45 + t.datetime "updated_at", null: false
  46 + t.boolean "public", default: true
49 47 end
50 48  
51   - add_index "repository_attributes", ["user_id"], name: "index_repository_attributes_on_user_id", using: :btree
  49 + add_index "repository_attributes", ["user_id"], name: "index_repository_attributes_on_user_id"
52 50  
53 51 create_table "users", force: :cascade do |t|
54 52 t.string "name", limit: 255, default: "", null: false
... ... @@ -66,7 +64,7 @@ ActiveRecord::Schema.define(version: 20151106182639) do
66 64 t.string "last_sign_in_ip", limit: 255
67 65 end
68 66  
69   - add_index "users", ["email"], name: "index_users_on_email", unique: true, using: :btree
70   - add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true, using: :btree
  67 + add_index "users", ["email"], name: "index_users_on_email", unique: true
  68 + add_index "users", ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
71 69  
72 70 end
... ...