You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docuseal/db/migrate/20260116000001_create_featu...

26 lines
803 B

# frozen_string_literal: true
# Migration: Create Feature Flags Table
# Purpose: Enable/disable FloDoc functionality without code changes
# Risk: LOW - Simple table with no foreign keys
class CreateFeatureFlags < ActiveRecord::Migration[7.0]
def change
create_table :feature_flags do |t|
t.string :name, null: false, index: { unique: true }
t.boolean :enabled, default: false, null: false
t.text :description
t.timestamps
end
# Seed default feature flags
reversible do |dir|
dir.up do
FeatureFlag.create!([
{ name: 'flodoc_cohorts', enabled: true, description: '3-portal cohort management system' },
{ name: 'flodoc_portals', enabled: true, description: 'Student and Sponsor portals' }
])
end
end
end
end