Change how migrations duplicated between glitch and upstream are handled (#2878)

This commit is contained in:
Claire
2024-10-09 18:36:19 +02:00
committed by GitHub
parent 7033b3476e
commit c574f5b53f
3 changed files with 15 additions and 63 deletions

View File

@@ -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
@@ -19,4 +20,6 @@ class CreateBookmarks < ActiveRecord::Migration[5.1]
add_index :bookmarks, [:account_id, :status_id], unique: true
end
def down; end
end

View File

@@ -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
@@ -19,4 +20,8 @@ class CreateBookmarks < ActiveRecord::Migration[5.2]
add_index :bookmarks, [:account_id, :status_id], unique: true
end
def down
drop_table :bookmarks
end
end