DEV: Fix spelling mistakes in DB migrations (#12811)
* spelling: initial * spelling: integer * spelling: irreversible * spelling: mislabeled * spelling: notification * spelling: nullable * spelling: targeted
This commit is contained in:
parent
cfee2728ce
commit
308c032293
|
@ -4,7 +4,7 @@ class AddNewPasswordNewSaltEmailTokenToUsers < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :users, :new_salt, :string, limit: 32
|
add_column :users, :new_salt, :string, limit: 32
|
||||||
add_column :users, :new_password_hash, :string, limit: 64
|
add_column :users, :new_password_hash, :string, limit: 64
|
||||||
# email token is more flexible, can be used for both intial activation AND password change confirmation
|
# email token is more flexible, can be used for both initial activation AND password change confirmation
|
||||||
add_column :users, :email_token, :string, limit: 32
|
add_column :users, :email_token, :string, limit: 32
|
||||||
remove_column :users, :activation_key
|
remove_column :users, :activation_key
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,7 +7,7 @@ class CreateActions < ActiveRecord::Migration[4.2]
|
||||||
# I elected for multiple ids as opposed to using :as cause it makes the table
|
# I elected for multiple ids as opposed to using :as cause it makes the table
|
||||||
# thinner, and the joining semantics much simpler (a simple multiple left join will do)
|
# thinner, and the joining semantics much simpler (a simple multiple left join will do)
|
||||||
#
|
#
|
||||||
# There is a notificiation table as well that covers much of this,
|
# There is a notification table as well that covers much of this,
|
||||||
# but this table is wider and is intended for non-notifying actions as well
|
# but this table is wider and is intended for non-notifying actions as well
|
||||||
|
|
||||||
t.integer :action_type, null: false
|
t.integer :action_type, null: false
|
||||||
|
|
|
@ -6,6 +6,6 @@ class RemoveTopicIdFromUploads < ActiveRecord::Migration[4.2]
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
add_column :uploads, :topic_id, :interger, null: false, default: -1
|
add_column :uploads, :topic_id, :integer, null: false, default: -1
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -2,6 +2,6 @@
|
||||||
|
|
||||||
class AddAutomaticallyUnpinTopicsToUsers < ActiveRecord::Migration[4.2]
|
class AddAutomaticallyUnpinTopicsToUsers < ActiveRecord::Migration[4.2]
|
||||||
def change
|
def change
|
||||||
add_column :users, :automatically_unpin_topics, :boolean, nullabe: false, default: true
|
add_column :users, :automatically_unpin_topics, :boolean, null: false, default: true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -9,7 +9,7 @@ class FixIncorrectUserHistory < ActiveRecord::Migration[4.2]
|
||||||
#
|
#
|
||||||
# This migration hunts for date stuff started going wrong and date it started being good and corrects the data
|
# This migration hunts for date stuff started going wrong and date it started being good and corrects the data
|
||||||
|
|
||||||
# this is a :auto_trust_level_change mislabled as :check_email
|
# this is a :auto_trust_level_change mislabeled as :check_email
|
||||||
# impersonate that was actually delete topic
|
# impersonate that was actually delete topic
|
||||||
condition = <<CLAUSE
|
condition = <<CLAUSE
|
||||||
(action = 16 AND previous_value in ('0','1','2','3','4')) OR
|
(action = 16 AND previous_value in ('0','1','2','3','4')) OR
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
class RemoveUsersFromTopicAllowedUsers < ActiveRecord::Migration[4.2]
|
class RemoveUsersFromTopicAllowedUsers < ActiveRecord::Migration[4.2]
|
||||||
|
|
||||||
# historically we added admins automatically to a message if they
|
# historically we added admins automatically to a message if they
|
||||||
# responded, despite them being in the group the message is targetted at
|
# responded, despite them being in the group the message is targeted at
|
||||||
# this causes inbox bloat for pretty much no reason
|
# this causes inbox bloat for pretty much no reason
|
||||||
def up
|
def up
|
||||||
sql = <<SQL
|
sql = <<SQL
|
||||||
|
|
|
@ -73,6 +73,6 @@ SQL
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
raise IrriversibleMigration
|
raise IrreversibleMigration
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -41,6 +41,6 @@ class AddTopicThumbnailInformation < ActiveRecord::Migration[6.0]
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
raise IrriversibleMigration
|
raise IrreversibleMigration
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -32,6 +32,6 @@ class MoveCategoryLastSeenAtToNewTable < ActiveRecord::Migration[6.0]
|
||||||
end
|
end
|
||||||
|
|
||||||
def down
|
def down
|
||||||
raise IrriversibleMigration
|
raise IrreversibleMigration
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue