fix(migrations): valid check if captain_brands exists
This commit is contained in:
parent
f7b293e4e9
commit
7014678c37
@ -1,5 +1,7 @@
|
|||||||
class CreateCaptainBrands < ActiveRecord::Migration[7.1]
|
class CreateCaptainBrands < ActiveRecord::Migration[7.1]
|
||||||
def change
|
def change
|
||||||
|
return if table_exists?(:captain_brands)
|
||||||
|
|
||||||
create_table :captain_brands do |t|
|
create_table :captain_brands do |t|
|
||||||
t.references :account, null: false, foreign_key: true
|
t.references :account, null: false, foreign_key: true
|
||||||
t.string :name, null: false
|
t.string :name, null: false
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user