Fix deprecation warnings in migrations

This commit is contained in:
Tom Hughes 2015-12-21 16:11:02 +00:00
parent 18b8fc60bb
commit febff23c2c
4 changed files with 6 additions and 6 deletions

View file

@ -9,7 +9,7 @@ class CreateOauthTables < ActiveRecord::Migration
t.string :secret, :limit => 50
t.integer :user_id
t.timestamps
t.timestamps :null => true
end
add_index :client_applications, :key, :unique => true
@ -20,7 +20,7 @@ class CreateOauthTables < ActiveRecord::Migration
t.string :token, :limit => 50
t.string :secret, :limit => 50
t.timestamp :authorized_at, :invalidated_at
t.timestamps
t.timestamps :null => true
end
add_index :oauth_tokens, :token, :unique => true
@ -29,7 +29,7 @@ class CreateOauthTables < ActiveRecord::Migration
t.string :nonce
t.integer :timestamp
t.timestamps
t.timestamps :null => true
end
add_index :oauth_nonces, [:nonce, :timestamp], :unique => true
end

View file

@ -8,7 +8,7 @@ class CreateUserRoles < ActiveRecord::Migration
t.column :user_id, :bigint, :null => false
t.column :role, :user_role_enum, :null => false
t.timestamps
t.timestamps :null => true
end
User.where(:administrator => true).each do |user|

View file

@ -10,7 +10,7 @@ class CreateUserBlocks < ActiveRecord::Migration
t.column :needs_view, :boolean, :null => false, :default => false
t.column :revoker_id, :bigint
t.timestamps
t.timestamps :null => true
end
add_foreign_key :user_blocks, :users, :name => "user_blocks_user_id_fkey"

View file

@ -6,7 +6,7 @@ class CreateRedactions < ActiveRecord::Migration
t.string :title
t.text :description
t.timestamps
t.timestamps :null => true
end
[:nodes, :ways, :relations].each do |tbl|