Implement forum topic voting and tag change pruning (#3580)
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
class CreateUsers < ActiveRecord::Migration
|
||||
class CreateUsers < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :users do |t|
|
||||
t.timestamps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePosts < ActiveRecord::Migration
|
||||
class CreatePosts < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :posts do |t|
|
||||
t.timestamps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateTags < ActiveRecord::Migration
|
||||
class CreateTags < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :tags do |t|
|
||||
t.column :name, :string, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePostVersions < ActiveRecord::Migration
|
||||
class CreatePostVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :post_versions do |t|
|
||||
t.timestamps
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateUploads < ActiveRecord::Migration
|
||||
class CreateUploads < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :uploads do |t|
|
||||
t.column :source, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePools < ActiveRecord::Migration
|
||||
class CreatePools < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :pools do |t|
|
||||
t.column :name, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateFavorites < ActiveRecord::Migration
|
||||
class CreateFavorites < ActiveRecord::Migration[4.2]
|
||||
TABLE_COUNT = 100
|
||||
|
||||
def self.up
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateTagAliases < ActiveRecord::Migration
|
||||
class CreateTagAliases < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :tag_aliases do |t|
|
||||
t.column :antecedent_name, :string, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateTagImplications < ActiveRecord::Migration
|
||||
class CreateTagImplications < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :tag_implications do |t|
|
||||
t.column :antecedent_name, :string, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateComments < ActiveRecord::Migration
|
||||
class CreateComments < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :comments do |t|
|
||||
t.column :post_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateCommentVotes < ActiveRecord::Migration
|
||||
class CreateCommentVotes < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :comment_votes do |t|
|
||||
t.column :comment_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateArtists < ActiveRecord::Migration
|
||||
class CreateArtists < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :artists do |t|
|
||||
t.column :name, :string, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateArtistVersions < ActiveRecord::Migration
|
||||
class CreateArtistVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :artist_versions do |t|
|
||||
t.column :artist_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateArtistUrls < ActiveRecord::Migration
|
||||
class CreateArtistUrls < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :artist_urls do |t|
|
||||
t.column :artist_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateWikiPages < ActiveRecord::Migration
|
||||
class CreateWikiPages < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :wiki_pages do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateWikiPageVersions < ActiveRecord::Migration
|
||||
class CreateWikiPageVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :wiki_page_versions do |t|
|
||||
t.column :wiki_page_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePostVotes < ActiveRecord::Migration
|
||||
class CreatePostVotes < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :post_votes do |t|
|
||||
t.column :post_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAdvertisements < ActiveRecord::Migration
|
||||
class CreateAdvertisements < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :advertisements do |t|
|
||||
t.column :referral_url, :text, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAdvertisementHits < ActiveRecord::Migration
|
||||
class CreateAdvertisementHits < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :advertisement_hits do |t|
|
||||
t.column :advertisement_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateBans < ActiveRecord::Migration
|
||||
class CreateBans < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :bans do |t|
|
||||
t.column :user_id, :integer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateUserFeedback < ActiveRecord::Migration
|
||||
class CreateUserFeedback < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :user_feedback do |t|
|
||||
t.column :user_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateDmails < ActiveRecord::Migration
|
||||
class CreateDmails < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :dmails do |t|
|
||||
t.column :owner_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateForumTopics < ActiveRecord::Migration
|
||||
class CreateForumTopics < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :forum_topics do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateForumPosts < ActiveRecord::Migration
|
||||
class CreateForumPosts < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :forum_posts do |t|
|
||||
t.column :topic_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePostDisapprovals < ActiveRecord::Migration
|
||||
class CreatePostDisapprovals < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :post_disapprovals do |t|
|
||||
t.column :user_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateNotes < ActiveRecord::Migration
|
||||
class CreateNotes < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :notes do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateNoteVersions < ActiveRecord::Migration
|
||||
class CreateNoteVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :note_versions do |t|
|
||||
t.column :note_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateTagSubscriptions < ActiveRecord::Migration
|
||||
class CreateTagSubscriptions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :tag_subscriptions do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateJanitorTrials < ActiveRecord::Migration
|
||||
class CreateJanitorTrials < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :janitor_trials do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateIpBans < ActiveRecord::Migration
|
||||
class CreateIpBans < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :ip_bans do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateDelayedJobs < ActiveRecord::Migration
|
||||
class CreateDelayedJobs < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :delayed_jobs, :force => true do |table|
|
||||
table.integer :priority, :default => 0 # Allows some jobs to jump to the front of the queue
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePostFlags < ActiveRecord::Migration
|
||||
class CreatePostFlags < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :post_flags do |t|
|
||||
t.column :post_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePostAppeals < ActiveRecord::Migration
|
||||
class CreatePostAppeals < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :post_appeals do |t|
|
||||
t.column :post_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePoolVersions < ActiveRecord::Migration
|
||||
class CreatePoolVersions < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
create_table :pool_versions do |t|
|
||||
t.column :pool_id, :integer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateUserPasswordResetNonces < ActiveRecord::Migration
|
||||
class CreateUserPasswordResetNonces < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :user_password_reset_nonces do |t|
|
||||
t.column :key, :string, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateModActions < ActiveRecord::Migration
|
||||
class CreateModActions < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :mod_actions do |t|
|
||||
t.column :creator_id, :integer, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateAmazonBackups < ActiveRecord::Migration
|
||||
class CreateAmazonBackups < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :amazon_backups do |t|
|
||||
t.integer :last_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateNewsUpdates < ActiveRecord::Migration
|
||||
class CreateNewsUpdates < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :news_updates do |t|
|
||||
t.column :message, :text, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddServerToUploads < ActiveRecord::Migration
|
||||
class AddServerToUploads < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :uploads, :server, :text
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddQueueToDelayedJobs < ActiveRecord::Migration
|
||||
class AddQueueToDelayedJobs < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
add_column :delayed_jobs, :queue, :string
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeUploadsSourceToText < ActiveRecord::Migration
|
||||
class ChangeUploadsSourceToText < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "alter table uploads alter column source type text"
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddParentIdToUploads < ActiveRecord::Migration
|
||||
class AddParentIdToUploads < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :uploads, :parent_id, :integer
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIndexUpdatedAtOnPostVersions < ActiveRecord::Migration
|
||||
class AddIndexUpdatedAtOnPostVersions < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :post_versions, :updated_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIndexCreatedAtOnUserFeedback < ActiveRecord::Migration
|
||||
class AddIndexCreatedAtOnUserFeedback < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :user_feedback, :created_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIndexUpdatedAtOnPoolVersions < ActiveRecord::Migration
|
||||
class AddIndexUpdatedAtOnPoolVersions < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :pool_versions, :updated_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIndexPixivOnPosts < ActiveRecord::Migration
|
||||
class AddIndexPixivOnPosts < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
execute "CREATE INDEX index_posts_on_pixiv_suffix ON posts USING btree
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddBcryptFieldsToUsers < ActiveRecord::Migration
|
||||
class AddBcryptFieldsToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddSettingsToUsers < ActiveRecord::Migration
|
||||
class AddSettingsToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :users, :enable_post_navigation, :boolean, :null => false, :default => true
|
||||
add_column :users, :new_post_navigation_layout, :boolean, :null => false, :default => true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLowerNameIndexToPools < ActiveRecord::Migration
|
||||
class AddLowerNameIndexToPools < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "create index index_pools_on_lower_name on pools (lower(name))"
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdaterInfoToComments < ActiveRecord::Migration
|
||||
class AddUpdaterInfoToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :comments, :updater_id, :integer
|
||||
add_column :comments, :updater_ip_addr, "inet"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdatedAtIndexToWikiPages < ActiveRecord::Migration
|
||||
class AddUpdatedAtIndexToWikiPages < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
# add_index :wiki_pages, :updated_at
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddEnablePostSeqNavigationToUsers < ActiveRecord::Migration
|
||||
class AddEnablePostSeqNavigationToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :enable_sequential_post_navigation, :boolean, :null => false, :default => true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeTagSubscriptionTagQueryType < ActiveRecord::Migration
|
||||
class ChangeTagSubscriptionTagQueryType < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "alter table tag_subscriptions alter column tag_query type text"
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdaterIdToWikiPages < ActiveRecord::Migration
|
||||
class AddUpdaterIdToWikiPages < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :wiki_pages, :updater_id, :integer
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIsBannedToPosts < ActiveRecord::Migration
|
||||
class AddIsBannedToPosts < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :posts, :is_banned, :boolean, :null => false, :default => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPerPageToUsers < ActiveRecord::Migration
|
||||
class AddPerPageToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :users, :per_page, :integer, :null => false, :default => 20
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddVersionToNotes < ActiveRecord::Migration
|
||||
class AddVersionToNotes < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :notes, :version, :integer, :null => false, :default => 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddHideDeletedPostsToUsers < ActiveRecord::Migration
|
||||
class AddHideDeletedPostsToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :hide_deleted_posts, :boolean, :null => false, :default => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateUserNameChangeRequests < ActiveRecord::Migration
|
||||
class CreateUserNameChangeRequests < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
create_table :user_name_change_requests do |t|
|
||||
t.string :status, :null => false, :default => "pending"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeSourcePatternIndexOnPosts < ActiveRecord::Migration
|
||||
class ChangeSourcePatternIndexOnPosts < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
execute "DROP INDEX index_posts_on_pixiv_suffix"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateKeyValues < ActiveRecord::Migration
|
||||
class CreateKeyValues < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :key_values do |t|
|
||||
t.string :key, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddPixivIdToPosts < ActiveRecord::Migration
|
||||
class AddPixivIdToPosts < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :posts, :pixiv_id, :integer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class DropIndexPostsOnCreatedAtDate < ActiveRecord::Migration
|
||||
class DropIndexPostsOnCreatedAtDate < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
execute "drop index index_posts_on_created_at_date"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCreatorIdIndexToComments < ActiveRecord::Migration
|
||||
class AddCreatorIdIndexToComments < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :comments, :creator_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddStyleUsernamesToUsers < ActiveRecord::Migration
|
||||
class AddStyleUsernamesToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :style_usernames, :boolean, :null => false, :default => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddNameToPoolVersions < ActiveRecord::Migration
|
||||
class AddNameToPoolVersions < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :pool_versions, :name, :string
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCategoryToPools < ActiveRecord::Migration
|
||||
class AddCategoryToPools < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :pools, :category, :string, :null => false, :default => "series"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCategoryToForumTopics < ActiveRecord::Migration
|
||||
class AddCategoryToForumTopics < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :forum_topics, :category_id, :integer, :default => 0, :null => false
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddEnableAutoCompleteToUsers < ActiveRecord::Migration
|
||||
class AddEnableAutoCompleteToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute("set statement_timeout = 0")
|
||||
add_column :users, :enable_auto_complete, :boolean, :null => false, :default => :true
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIsLockedToTags < ActiveRecord::Migration
|
||||
class AddIsLockedToTags < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :tags, :is_locked, :boolean, :null => false, :default => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCustomStyleToUsers < ActiveRecord::Migration
|
||||
class AddCustomStyleToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :custom_style, :text
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeTagSubscriptionTagQueryDelimiter < ActiveRecord::Migration
|
||||
class ChangeTagSubscriptionTagQueryDelimiter < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
TagSubscription.find_each do |tag_subscription|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class UpdateAliasedImplicationConsequents < ActiveRecord::Migration
|
||||
class UpdateAliasedImplicationConsequents < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
TagImplication.find_each do |ti|
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateArtistCommentaries < ActiveRecord::Migration
|
||||
class CreateArtistCommentaries < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :artist_commentaries do |t|
|
||||
t.integer :post_id, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateArtistCommentaryVersions < ActiveRecord::Migration
|
||||
class CreateArtistCommentaryVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :artist_commentary_versions do |t|
|
||||
t.integer :post_id, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddCreatorIdAndPostIdIndexesToCommentsAndNotes < ActiveRecord::Migration
|
||||
class AddCreatorIdAndPostIdIndexesToCommentsAndNotes < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "set statement_timeout = 0"
|
||||
remove_index :comments, :creator_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdaterIdAndPostIdIndexesToNoteVersionsAndArtistCommentaryVersions < ActiveRecord::Migration
|
||||
class AddUpdaterIdAndPostIdIndexesToNoteVersionsAndArtistCommentaryVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "set statement_timeout = 0"
|
||||
remove_index :note_versions, :updater_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdatedAtAndIdIndexToPostVersions < ActiveRecord::Migration
|
||||
class AddUpdatedAtAndIdIndexToPostVersions < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "set statement_timeout = 0"
|
||||
remove_index :post_versions, :updated_at
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddLastCommentBumpedAtToPosts < ActiveRecord::Migration
|
||||
class AddLastCommentBumpedAtToPosts < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
execute "SET statement_timeout = 0"
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class ChangeSourceIndexOnPosts < ActiveRecord::Migration
|
||||
class ChangeSourceIndexOnPosts < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
execute "DROP INDEX index_posts_on_source"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateTransactionLogItems < ActiveRecord::Migration
|
||||
class CreateTransactionLogItems < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :transaction_log_items do |t|
|
||||
t.string :category
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddIpAddrToDmails < ActiveRecord::Migration
|
||||
class AddIpAddrToDmails < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :dmails, :creator_ip_addr, :inet, :null => false, :default => "127.0.0.1"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddShowDeletedChildrenToUsers < ActiveRecord::Migration
|
||||
class AddShowDeletedChildrenToUsers < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :show_deleted_children, :boolean, :null => false, :default => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddOtherNamesToWikiPages < ActiveRecord::Migration
|
||||
class AddOtherNamesToWikiPages < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :wiki_pages, :other_names, :text
|
||||
add_column :wiki_pages, :other_names_index, :tsvector
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateSavedSearches < ActiveRecord::Migration
|
||||
class CreateSavedSearches < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :saved_searches do |t|
|
||||
t.integer :user_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddBitPrefsToUsers < ActiveRecord::Migration
|
||||
class AddBitPrefsToUsers < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :users, :bit_prefs, "bigint", :null => false, :default => 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateBulkUpdateRequests < ActiveRecord::Migration
|
||||
class CreateBulkUpdateRequests < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :bulk_update_requests do |t|
|
||||
t.integer :user_id, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateForumTopicVisits < ActiveRecord::Migration
|
||||
class CreateForumTopicVisits < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :forum_topic_visits do |t|
|
||||
t.integer :user_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateApiKeys < ActiveRecord::Migration
|
||||
class CreateApiKeys < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :api_keys do |t|
|
||||
t.integer :user_id, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateForumSubscriptions < ActiveRecord::Migration
|
||||
class CreateForumSubscriptions < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :forum_subscriptions do |t|
|
||||
t.integer :user_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreatePixivUgoiraFrameData < ActiveRecord::Migration
|
||||
class CreatePixivUgoiraFrameData < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :pixiv_ugoira_frame_data do |t|
|
||||
t.integer :post_id
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class FixPixivUgoiraFrameData < ActiveRecord::Migration
|
||||
class FixPixivUgoiraFrameData < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
change_table :pixiv_ugoira_frame_data do |t|
|
||||
t.change :data, :text, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateDmailFilters < ActiveRecord::Migration
|
||||
class CreateDmailFilters < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
create_table :dmail_filters do |t|
|
||||
t.integer :user_id, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddUpdatedAtIndexToForumTopics < ActiveRecord::Migration
|
||||
class AddUpdatedAtIndexToForumTopics < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
add_index :forum_topics, :updated_at
|
||||
|
||||
@@ -1,7 +1,10 @@
|
||||
class RemoveUnusedIndexes < ActiveRecord::Migration
|
||||
class RemoveUnusedIndexes < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
remove_index :posts, :source
|
||||
remove_index :posts, :uploader_ip_addr
|
||||
begin
|
||||
remove_index :posts, :source
|
||||
remove_index :posts, :uploader_ip_addr
|
||||
rescue ArgumentError
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddBitFlagsToPosts < ActiveRecord::Migration
|
||||
class AddBitFlagsToPosts < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
execute "set statement_timeout = 0"
|
||||
add_column :posts, :bit_flags, "bigint", :null => false, :default => 0
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddAntecedentNamePatternIndexAndPostCountToTagAliases < ActiveRecord::Migration
|
||||
class AddAntecedentNamePatternIndexAndPostCountToTagAliases < ActiveRecord::Migration[4.2]
|
||||
def up
|
||||
execute "set statement_timeout = 0"
|
||||
execute "create index index_tag_aliases_on_antecedent_name_pattern on tag_aliases (antecedent_name text_pattern_ops)"
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class AddStatusToJanitorTrials < ActiveRecord::Migration
|
||||
class AddStatusToJanitorTrials < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
add_column :janitor_trials, :status, :string, :null => false, :default => "active"
|
||||
end
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class CreateFavoriteGroups < ActiveRecord::Migration
|
||||
class CreateFavoriteGroups < ActiveRecord::Migration[4.2]
|
||||
def self.up
|
||||
create_table :favorite_groups do |t|
|
||||
t.text :name, :null => false
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class RemoveNotNullOnJanitorTrials < ActiveRecord::Migration
|
||||
class RemoveNotNullOnJanitorTrials < ActiveRecord::Migration[4.2]
|
||||
def change
|
||||
change_column :janitor_trials, :original_level, :integer, :null => true
|
||||
end
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user