mirror of
https://github.com/Retrospring/retrospring.git
synced 2025-02-25 22:03:02 +01:00
14 lines
362 B
Ruby
14 lines
362 B
Ruby
# frozen_string_literal: true
|
|
|
|
class AllowMultipleThemes < ActiveRecord::Migration[7.0]
|
|
def up
|
|
change_table :themes, bulk: true do |t|
|
|
t.boolean :active, default: true, null: false
|
|
t.string :name, null: true
|
|
end
|
|
|
|
change_column :themes, :active, :boolean, default: false, null: false
|
|
|
|
add_index :themes, %i[user_id active]
|
|
end
|
|
end
|