gitlab-org--gitlab-foss/db/migrate/20151103134958_create_lfs_objects_projects.rb
Rémy Coutable c33b489853
Add null: true to timestamps in migrations that does not define it
This is to ensure that migrations will still be consitent when we will
upgrade to Rails 5 which default to `null: false` for timestamps
columns.

Fixes #23666.

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-11-28 16:45:08 +01:00

13 lines
322 B
Ruby

# rubocop:disable all
class CreateLfsObjectsProjects < ActiveRecord::Migration
def change
create_table :lfs_objects_projects do |t|
t.integer :lfs_object_id, null: false
t.integer :project_id, null: false
t.timestamps null: true
end
add_index :lfs_objects_projects, :project_id
end
end