diff options
author | Robert Speicher <robert@gitlab.com> | 2016-06-16 17:27:17 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2016-06-16 17:27:17 +0000 |
commit | 24b15d506075842db787cea5e75e7f2ab0715d22 (patch) | |
tree | 9415691429093f156f7ddbfecbe1e0b05fcaa7aa | |
parent | ffae8ad44ef81a3817189f42d1d2c0c17a31631b (diff) | |
parent | 5a420ea7c23664862f00c0b837aa62b241499046 (diff) | |
download | gitlab-ce-24b15d506075842db787cea5e75e7f2ab0715d22.tar.gz |
Merge branch 'schema_fix_to_stable' into '8-9-stable'
Make project_id nullable
See merge request !4701
See merge request !4707
-rw-r--r-- | db/migrate/20160616084004_change_project_of_environment.rb | 21 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 22 insertions, 1 deletions
diff --git a/db/migrate/20160616084004_change_project_of_environment.rb b/db/migrate/20160616084004_change_project_of_environment.rb new file mode 100644 index 00000000000..cc1daf9b621 --- /dev/null +++ b/db/migrate/20160616084004_change_project_of_environment.rb @@ -0,0 +1,21 @@ +# See http://doc.gitlab.com/ce/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class ChangeProjectOfEnvironment < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + # When using the methods "add_concurrent_index" or "add_column_with_default" + # you must disable the use of transactions as these methods can not run in an + # existing transaction. When using "add_concurrent_index" make sure that this + # method is the _only_ method called in the migration, any other changes + # should go in a separate migration. This ensures that upon failure _only_ the + # index creation fails and can be retried or reverted easily. + # + # To disable transactions uncomment the following line and remove these + # comments: + # disable_ddl_transaction! + + def change + change_column_null :environments, :project_id, true + end +end diff --git a/db/schema.rb b/db/schema.rb index 6a3be7297e3..d6a542a89fd 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: 20160615142710) do +ActiveRecord::Schema.define(version: 20160616084004) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" |