diff options
Diffstat (limited to 'db')
3 files changed, 18 insertions, 2 deletions
diff --git a/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb new file mode 100644 index 00000000000..9b0f13f3fa7 --- /dev/null +++ b/db/migrate/20150423033240_add_default_project_visibililty_to_application_settings.rb @@ -0,0 +1,7 @@ +class AddDefaultProjectVisibililtyToApplicationSettings < ActiveRecord::Migration + def change + add_column :application_settings, :default_project_visibility, :integer + visibility = Settings.gitlab.default_projects_features['visibility_level'] + execute("update application_settings set default_project_visibility = #{visibility}") + end +end diff --git a/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb new file mode 100644 index 00000000000..51237354d9f --- /dev/null +++ b/db/migrate/20150425173433_add_default_snippet_visibility_to_app_settings.rb @@ -0,0 +1,7 @@ +class AddDefaultSnippetVisibilityToAppSettings < ActiveRecord::Migration + def change + add_column :application_settings, :default_snippet_visibility, :integer + visibility = Settings.gitlab.default_projects_features['visibility_level'] + execute("update application_settings set default_snippet_visibility = #{visibility}") + end +end diff --git a/db/schema.rb b/db/schema.rb index 6db7e386c86..8683c0446fe 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: 20150421120000) do +ActiveRecord::Schema.define(version: 20150425173433) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -29,6 +29,8 @@ ActiveRecord::Schema.define(version: 20150421120000) do t.boolean "twitter_sharing_enabled", default: true t.text "restricted_visibility_levels" t.integer "max_attachment_size", default: 10, null: false + t.integer "default_project_visibility" + t.integer "default_snippet_visibility" end create_table "broadcast_messages", force: true do |t| @@ -470,6 +472,7 @@ ActiveRecord::Schema.define(version: 20150421120000) do t.integer "notification_level", default: 1, null: false t.datetime "password_expires_at" t.integer "created_by_id" + t.datetime "last_credential_check_at" t.string "avatar" t.string "confirmation_token" t.datetime "confirmed_at" @@ -477,7 +480,6 @@ ActiveRecord::Schema.define(version: 20150421120000) do t.string "unconfirmed_email" t.boolean "hide_no_ssh_key", default: false t.string "website_url", default: "", null: false - t.datetime "last_credential_check_at" t.string "github_access_token" t.string "gitlab_access_token" t.string "notification_email" |