diff options
author | Michael Kozono <mkozono@gmail.com> | 2017-11-24 10:51:29 +0300 |
---|---|---|
committer | Michael Kozono <mkozono@gmail.com> | 2017-12-02 02:26:42 +0300 |
commit | 61a73cadb7f21de9f863fc1a16f13880861ac9f4 (patch) | |
tree | 327a3b80e77503d5de29576357a2e7ed198f8ad8 /lib/gitlab/background_migration | |
parent | a9c868d111c0231c4358d0ee017d1a9e9a28d3dd (diff) |
Get rid of timestamps on untracked files table
`updated_at` is now unnecessary and `created_at` is less useful due to removing the tracked field.
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r-- | lib/gitlab/background_migration/prepare_untracked_uploads.rb | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/gitlab/background_migration/prepare_untracked_uploads.rb b/lib/gitlab/background_migration/prepare_untracked_uploads.rb index c076c13815d..358b76d39fb 100644 --- a/lib/gitlab/background_migration/prepare_untracked_uploads.rb +++ b/lib/gitlab/background_migration/prepare_untracked_uploads.rb @@ -42,7 +42,6 @@ module Gitlab unless UntrackedFile.connection.table_exists?(:untracked_files_for_uploads) UntrackedFile.connection.create_table :untracked_files_for_uploads do |t| t.string :path, limit: 600, null: false - t.timestamps_with_timezone null: false t.index :path, unique: true end end @@ -117,10 +116,10 @@ module Gitlab def table_columns_and_values_for_insert(file_paths) values = file_paths.map do |file_path| - ActiveRecord::Base.send(:sanitize_sql_array, ['(?, NOW(), NOW())', file_path]) # rubocop:disable GitlabSecurity/PublicSend + ActiveRecord::Base.send(:sanitize_sql_array, ['(?)', file_path]) # rubocop:disable GitlabSecurity/PublicSend end.join(', ') - "#{UntrackedFile.table_name} (path, created_at, updated_at) VALUES #{values}" + "#{UntrackedFile.table_name} (path) VALUES #{values}" end def postgresql? |