Skip to content

Commit

Permalink
Change how migrations duplicated between glitch and upstream are hand…
Browse files Browse the repository at this point in the history
…led (#2878)
  • Loading branch information
ClearlyClaire authored Oct 9, 2024
1 parent 7033b34 commit c574f5b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 63 deletions.
56 changes: 0 additions & 56 deletions config/initializers/0_duplicate_migrations.rb

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

# This migration is a duplicate of 20180831171112 and may get ignored, see
# config/initializers/0_duplicate_migrations.rb
# This migration is a duplicate of 20180831171112

class GlitchCreateBookmarks < ActiveRecord::Migration[5.1]
def up
return if table_exists?(:bookmarks)

class CreateBookmarks < ActiveRecord::Migration[5.1]
def change
create_table :bookmarks do |t|
t.references :account, null: false
t.references :status, null: false
Expand All @@ -19,4 +20,6 @@ def change

add_index :bookmarks, [:account_id, :status_id], unique: true
end

def down; end
end
11 changes: 8 additions & 3 deletions db/migrate/20180831171112_create_bookmarks.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
# frozen_string_literal: true

# This migration is a duplicate of 20180410220657 and may get ignored, see
# config/initializers/0_duplicate_migrations.rb
# This migration is a duplicate of 20180410220657

class CreateBookmarks < ActiveRecord::Migration[5.2]
def change
def up
return if table_exists?(:bookmarks)

create_table :bookmarks do |t|
t.references :account, null: false
t.references :status, null: false
Expand All @@ -19,4 +20,8 @@ def change

add_index :bookmarks, [:account_id, :status_id], unique: true
end

def down
drop_table :bookmarks
end
end

0 comments on commit c574f5b

Please sign in to comment.