2023-09-04 19:58:11 +08:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-09-06 22:13:38 +08:00
|
|
|
require File.expand_path('app/helpers/database_helper')
|
|
|
|
|
2023-09-04 19:58:11 +08:00
|
|
|
class AddNameColumnToTextComponent < ActiveRecord::Migration[7.0]
|
2023-09-06 22:13:38 +08:00
|
|
|
include DatabaseHelper
|
|
|
|
|
|
|
|
def up
|
|
|
|
add_column :result_texts, :name, :string
|
|
|
|
add_column :step_texts, :name, :string
|
|
|
|
add_gist_index :result_texts, :name
|
|
|
|
add_gist_index :step_texts, :name
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_index :step_texts, :name
|
|
|
|
remove_index :result_texts, :name
|
|
|
|
remove_column :step_texts, :name
|
|
|
|
remove_column :result_texts, :name
|
2023-09-04 19:58:11 +08:00
|
|
|
end
|
|
|
|
end
|