Skip to content

Commit

Permalink
Fix old migration inheritance
Browse files Browse the repository at this point in the history
  • Loading branch information
olivierlacan committed Jun 30, 2017
1 parent b410492 commit 063e212
Show file tree
Hide file tree
Showing 32 changed files with 33 additions and 33 deletions.
2 changes: 1 addition & 1 deletion db/migrate/20121012052227_create_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateArticles < ActiveRecord::Migration
class CreateArticles < ActiveRecord::Migration[4.2]
def change
create_table :articles do |t|
t.string :title
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121012053216_create_authors.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateAuthors < ActiveRecord::Migration
class CreateAuthors < ActiveRecord::Migration[4.2]
def change
create_table :authors do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121024172653_create_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateUsers < ActiveRecord::Migration
class CreateUsers < ActiveRecord::Migration[4.2]
def change
create_table :users do |t|
t.string :provider
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121101215757_create_tags.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateTags < ActiveRecord::Migration
class CreateTags < ActiveRecord::Migration[4.2]
def change
create_table :tags do |t|
t.string :name
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121101230245_create_articles_tags_table.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateArticlesTagsTable < ActiveRecord::Migration
class CreateArticlesTagsTable < ActiveRecord::Migration[4.2]
def change
create_table :articles_tags, id: false do |t|
t.references :article
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121107203955_add_slug_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSlugToArticles < ActiveRecord::Migration
class AddSlugToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :slug, :string

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121107205723_add_slug_to_tags.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSlugToTags < ActiveRecord::Migration
class AddSlugToTags < ActiveRecord::Migration[4.2]
def change
add_column :tags, :slug, :string

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20121228090236_add_editor_id_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddEditorIdToArticles < ActiveRecord::Migration
class AddEditorIdToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :editor_id, :integer
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130218024132_add_fuzzy_matching_extension.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddFuzzyMatchingExtension < ActiveRecord::Migration
class AddFuzzyMatchingExtension < ActiveRecord::Migration[4.2]
def up
execute "create extension fuzzystrmatch"
execute "create extension pg_trgm"
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130224191645_add_image_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddImageToUsers < ActiveRecord::Migration
class AddImageToUsers < ActiveRecord::Migration[4.2]
def change
change_table :users do |t|
t.string :image
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130302074219_add_search_index_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSearchIndexToArticles < ActiveRecord::Migration
class AddSearchIndexToArticles < ActiveRecord::Migration[4.2]
def up
execute "create index articles_title on articles using gin(to_tsvector('english', title))"
execute "create index articles_content on articles using gin(to_tsvector('english', content))"
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20130519172832_remove_authors.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class RemoveAuthors < ActiveRecord::Migration
class RemoveAuthors < ActiveRecord::Migration[4.2]
def change
drop_table :authors
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20131002145513_create_delayed_jobs.rb
Original file line number Diff line number Diff line change
@@ -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, :null => false # Allows some jobs to jump to the front of the queue
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddLastNotifiedAuthorAtToArticles < ActiveRecord::Migration
class AddLastNotifiedAuthorAtToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :last_notified_author_at, :datetime
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140215004410_add_avatar_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddAvatarToUsers < ActiveRecord::Migration
class AddAvatarToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :avatar, :string
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140216160144_add_active_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddActiveToUsers < ActiveRecord::Migration
class AddActiveToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :active, :boolean, default: true
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140217025247_add_shtick_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddShtickToUsers < ActiveRecord::Migration
class AddShtickToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :shtick, :text
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140522210252_add_archived_at_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddArchivedAtToArticles < ActiveRecord::Migration
class AddArchivedAtToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :archived_at, :timestamp
end
Expand Down
4 changes: 2 additions & 2 deletions db/migrate/20140602153320_create_article_subscriptions.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class CreateArticleSubscriptions < ActiveRecord::Migration
class CreateArticleSubscriptions < ActiveRecord::Migration[4.2]
def change
create_table :article_subscriptions do |t|
t.belongs_to :article
t.belongs_to :article
t.belongs_to :user
t.timestamps
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20140606204236_add_rotted_at_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddRottedAtToArticles < ActiveRecord::Migration
class AddRottedAtToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :rotted_at, :datetime
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddCounterCacheToTagsAndArticles < ActiveRecord::Migration
class AddCounterCacheToTagsAndArticles < ActiveRecord::Migration[4.2]
def change
change_table :articles do |t|
t.integer :tags_count, default: 0, null: false
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20141111222212_add_guide_boolean_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddGuideBooleanToArticles < ActiveRecord::Migration
class AddGuideBooleanToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :guide, :boolean, default: false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150117041549_add_article_indices.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddArticleIndices < ActiveRecord::Migration
class AddArticleIndices < ActiveRecord::Migration[4.2]
disable_ddl_transaction!

def change
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150129150300_create_article_endorsements.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateArticleEndorsements < ActiveRecord::Migration
class CreateArticleEndorsements < ActiveRecord::Migration[4.2]
def change
create_table :article_endorsements do |t|
t.integer :user_id
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddSubscriptionsCountToArticles < ActiveRecord::Migration
class AddSubscriptionsCountToArticles < ActiveRecord::Migration[4.2]
class MigrationArticleSubscription < ActiveRecord::Base
self.table_name = "article_subscriptions"
belongs_to :article, class_name: "MigrationArticle", foreign_key: "article_id"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddEndorsementsCountToArticles < ActiveRecord::Migration
class AddEndorsementsCountToArticles < ActiveRecord::Migration[4.2]
class MigrationArticleEndorsement < ActiveRecord::Base
self.table_name = "article_endorsements"
belongs_to :article, class_name: "MigrationArticle", foreign_key: "article_id"
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150328074815_add_visits_to_articles.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddVisitsToArticles < ActiveRecord::Migration
class AddVisitsToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :visits, :integer, default: 0, null: false
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150416104151_create_friendly_id_slugs.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class CreateFriendlyIdSlugs < ActiveRecord::Migration
class CreateFriendlyIdSlugs < ActiveRecord::Migration[4.2]
class MigrationArticle < ActiveRecord::Base
self.table_name = :articles
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150829203748_add_id_to_articles_tags.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddIdToArticlesTags < ActiveRecord::Migration
class AddIdToArticlesTags < ActiveRecord::Migration[4.2]
def change
add_column :articles_tags, :id, :primary_key
end
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class GenerateSlugsForExistingTags < ActiveRecord::Migration
class GenerateSlugsForExistingTags < ActiveRecord::Migration[4.2]
class MigrationTag < ActiveRecord::Base
self.table_name = "tags"

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddRotReporterIdToArticles < ActiveRecord::Migration
class AddRotReporterIdToArticles < ActiveRecord::Migration[4.2]
def change
add_column :articles, :rot_reporter_id, :integer
end
Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20150922233803_add_preferences_to_users.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
class AddPreferencesToUsers < ActiveRecord::Migration
class AddPreferencesToUsers < ActiveRecord::Migration[4.2]
def change
add_column :users, :preferences, :json
end
Expand Down

0 comments on commit 063e212

Please sign in to comment.