Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorZ.J. van de Weg <zegerjan@gitlab.com>2016-07-26 10:35:47 +0300
committerZ.J. van de Weg <zegerjan@gitlab.com>2016-07-29 14:54:45 +0300
commitbe9aa7f19474424991923f128053e2523fa166d8 (patch)
treedde83c7c92d7b932d3b9b79405fb1e5524034345 /db
parent242f8377264973d642b46e5d2800ef3d3bd4c0fa (diff)
Add an URL field to Environments
This MR adds a string (thus max 255 chars) field to the enviroments table to expose it later in other features.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20160725083350_add_external_url_to_enviroments.rb12
-rw-r--r--db/schema.rb3
2 files changed, 14 insertions, 1 deletions
diff --git a/db/migrate/20160725083350_add_external_url_to_enviroments.rb b/db/migrate/20160725083350_add_external_url_to_enviroments.rb
new file mode 100644
index 00000000000..e887341159b
--- /dev/null
+++ b/db/migrate/20160725083350_add_external_url_to_enviroments.rb
@@ -0,0 +1,12 @@
+# See http://doc.gitlab.com/ce/development/migration_style_guide.html
+# for more information on how to write migrations for GitLab.
+
+class AddExternalUrlToEnviroments < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def change
+ add_column(:environments, :external_url, :string)
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 2d2ae5fd840..4365af98962 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -427,9 +427,10 @@ ActiveRecord::Schema.define(version: 20160722221922) do
create_table "environments", force: :cascade do |t|
t.integer "project_id"
- t.string "name", null: false
+ t.string "name", null: false
t.datetime "created_at"
t.datetime "updated_at"
+ t.string "external_url"
end
add_index "environments", ["project_id", "name"], name: "index_environments_on_project_id_and_name", using: :btree