|
| 1 | +import {Kysely} from 'kysely' |
| 2 | + |
| 3 | +export async function up(db: Kysely<any>): Promise<void> { |
| 4 | + await db |
| 5 | + .insertInto('FeatureFlag') |
| 6 | + .values([ |
| 7 | + { |
| 8 | + featureName: 'insights', |
| 9 | + description: 'Whether the team has access to an AI summary of their wins and challenges', |
| 10 | + expiresAt: new Date('2025-01-31T00:00:00.000Z'), |
| 11 | + scope: 'Team' |
| 12 | + }, |
| 13 | + { |
| 14 | + featureName: 'publicTeams', |
| 15 | + description: 'Whether users can see teams they are not a member of in an org', |
| 16 | + expiresAt: new Date('2025-01-31T00:00:00.000Z'), |
| 17 | + scope: 'Organization' |
| 18 | + }, |
| 19 | + { |
| 20 | + featureName: 'relatedDiscussions', |
| 21 | + description: |
| 22 | + 'A comment in a retro discussion thread that uses AI to show similar conversations in the past', |
| 23 | + expiresAt: new Date('2025-01-31T00:00:00.000Z'), |
| 24 | + scope: 'Organization' |
| 25 | + }, |
| 26 | + { |
| 27 | + featureName: 'standupAISummary', |
| 28 | + description: 'Whether the standup UI has an AI meeting Summary or not', |
| 29 | + expiresAt: new Date('2025-01-31T00:00:00.000Z'), |
| 30 | + scope: 'Organization' |
| 31 | + }, |
| 32 | + { |
| 33 | + featureName: 'suggestGroups', |
| 34 | + description: 'Auto-group reflections using AI', |
| 35 | + expiresAt: new Date('2025-01-31T00:00:00.000Z'), |
| 36 | + scope: 'Organization' |
| 37 | + } |
| 38 | + ]) |
| 39 | + .execute() |
| 40 | +} |
| 41 | + |
| 42 | +export async function down(db: Kysely<any>): Promise<void> { |
| 43 | + await db |
| 44 | + .deleteFrom('FeatureFlag') |
| 45 | + .where('featureName', 'in', [ |
| 46 | + 'insights', |
| 47 | + 'publicTeams', |
| 48 | + 'relatedDiscussions', |
| 49 | + 'standupAISummary', |
| 50 | + 'suggestGroups' |
| 51 | + ]) |
| 52 | + .execute() |
| 53 | +} |
0 commit comments