diff options
author | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-04-14 15:22:57 +0200 |
---|---|---|
committer | Jeroen van Baarsen <jeroenvanbaarsen@gmail.com> | 2014-04-14 15:22:57 +0200 |
commit | 802087c937d844d061cacff7fe1d44fd044ee91f (patch) | |
tree | 8b19ee96c8bc23f0fb21a3185a4509a0bebbd4db /db | |
parent | c898dc00dca49e8a073421cbfe0765254e52fed8 (diff) | |
download | gitlab-ce-802087c937d844d061cacff7fe1d44fd044ee91f.tar.gz |
Changed default in the database for the statemachine
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 6 |
2 files changed, 12 insertions, 3 deletions
diff --git a/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb new file mode 100644 index 00000000000..e131cbd132a --- /dev/null +++ b/db/migrate/20140414131055_change_state_to_allow_empty_merge_request_diffs.rb @@ -0,0 +1,9 @@ +class ChangeStateToAllowEmptyMergeRequestDiffs < ActiveRecord::Migration + def up + change_column :merge_request_diffs, :state, :string, null: true, default: nil + end + + def down + change_column :merge_request_diffs, :state, :string, null: false, default: "collected" + end +end diff --git a/db/schema.rb b/db/schema.rb index 9033aa92ac9..265d556bd27 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: 20140407135544) do +ActiveRecord::Schema.define(version: 20140414131055) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -109,10 +109,10 @@ ActiveRecord::Schema.define(version: 20140407135544) do add_index "keys", ["user_id"], name: "index_keys_on_user_id", using: :btree create_table "merge_request_diffs", force: true do |t| - t.string "state", default: "collected", null: false + t.string "state" t.text "st_commits" t.text "st_diffs" - t.integer "merge_request_id", null: false + t.integer "merge_request_id", null: false t.datetime "created_at" t.datetime "updated_at" end |