summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-03-04 15:08:09 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-03-04 15:08:09 +0000
commitd3fc3be040a4fed2328e23ef28696dd8bd8238b4 (patch)
treef1874ea5e6e3c50c6a3c2ca2900af4ae73a53119 /db
parentc6c7437861bff9572747674095c4dfbdfbea4988 (diff)
downloadgitlab-ce-d3fc3be040a4fed2328e23ef28696dd8bd8238b4.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20191114201118_make_created_at_not_null_in_design_management_versions.rb15
-rw-r--r--db/schema.rb2
2 files changed, 16 insertions, 1 deletions
diff --git a/db/migrate/20191114201118_make_created_at_not_null_in_design_management_versions.rb b/db/migrate/20191114201118_make_created_at_not_null_in_design_management_versions.rb
new file mode 100644
index 00000000000..7b9d70c1a50
--- /dev/null
+++ b/db/migrate/20191114201118_make_created_at_not_null_in_design_management_versions.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class MakeCreatedAtNotNullInDesignManagementVersions < ActiveRecord::Migration[5.2]
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ def up
+ change_column_null :design_management_versions, :created_at, false, Time.now.to_s(:db)
+ end
+
+ def down
+ change_column_null :design_management_versions, :created_at, true
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 32fab15182c..5cf32dc5752 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1446,7 +1446,7 @@ ActiveRecord::Schema.define(version: 2020_03_03_074328) do
create_table "design_management_versions", force: :cascade do |t|
t.binary "sha", null: false
t.bigint "issue_id"
- t.datetime_with_timezone "created_at"
+ t.datetime_with_timezone "created_at", null: false
t.integer "author_id"
t.index ["author_id"], name: "index_design_management_versions_on_author_id", where: "(author_id IS NOT NULL)"
t.index ["issue_id"], name: "index_design_management_versions_on_issue_id"