From: Tom Hughes Date: Mon, 21 Dec 2015 16:11:02 +0000 (+0000) Subject: Fix deprecation warnings in migrations X-Git-Tag: live~3975 X-Git-Url: https://git.openstreetmap.org/rails.git/commitdiff_plain/febff23c2cad12af3d7da51e5dc2f315487b1f0c Fix deprecation warnings in migrations --- diff --git a/db/migrate/040_create_oauth_tables.rb b/db/migrate/040_create_oauth_tables.rb index 4b3725365..a2eeeca7a 100644 --- a/db/migrate/040_create_oauth_tables.rb +++ b/db/migrate/040_create_oauth_tables.rb @@ -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 diff --git a/db/migrate/044_create_user_roles.rb b/db/migrate/044_create_user_roles.rb index b5e439406..bae5a3cad 100644 --- a/db/migrate/044_create_user_roles.rb +++ b/db/migrate/044_create_user_roles.rb @@ -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| diff --git a/db/migrate/045_create_user_blocks.rb b/db/migrate/045_create_user_blocks.rb index cdb36cd15..71081f5c1 100644 --- a/db/migrate/045_create_user_blocks.rb +++ b/db/migrate/045_create_user_blocks.rb @@ -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" diff --git a/db/migrate/20120318201948_create_redactions.rb b/db/migrate/20120318201948_create_redactions.rb index bb9786db4..8a1cf6bf3 100644 --- a/db/migrate/20120318201948_create_redactions.rb +++ b/db/migrate/20120318201948_create_redactions.rb @@ -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|