|
210 | 210 | END; |
211 | 211 | """) |
212 | 212 | _conn.commit() |
213 | | - # Seed data if missions table is empty (guard on row count, not table existence) |
214 | | - _cur.execute("SELECT COUNT(*) FROM missions") |
215 | | - if _cur.fetchone()[0] == 0: |
216 | | - _now_seed = "2026-04-14T00:00:00.000000Z" |
217 | | - _cur.execute(""" |
218 | | - INSERT INTO missions (slug, title, description, target_metric, target_value, current_value, due_date, status, created_at, updated_at) |
219 | | - VALUES ('evo-revenue-1m-q4-2026', 'Evolution Revenue $1M Q4 2026', |
220 | | - 'Atingir $1M de receita anual até o Q4 2026', |
221 | | - 'revenue_usd', 1000000, 0, '2026-12-31', 'active', ?, ?) |
222 | | - """, (_now_seed, _now_seed)) |
223 | | - _mission_id = _cur.lastrowid |
224 | | - # Projects |
225 | | - for _slug, _title, _desc in [ |
226 | | - ('evo-ai', 'Evo AI', 'CRM + AI agents — produto principal'), |
227 | | - ('evo-summit', 'Evolution Summit', 'Evento de lançamento (14-16 Abr 2026)'), |
228 | | - ('evo-academy', 'Evo Academy', 'Plataforma de cursos'), |
229 | | - ]: |
230 | | - _cur.execute(""" |
231 | | - INSERT INTO projects (slug, mission_id, title, description, status, created_at, updated_at) |
232 | | - VALUES (?, ?, ?, ?, 'active', ?, ?) |
233 | | - """, (_slug, _mission_id, _title, _desc, _now_seed, _now_seed)) |
234 | | - _conn.commit() |
235 | | - # Goals per project |
236 | | - _evo_ai_id = _cur.execute("SELECT id FROM projects WHERE slug='evo-ai'").fetchone()[0] |
237 | | - _summit_id = _cur.execute("SELECT id FROM projects WHERE slug='evo-summit'").fetchone()[0] |
238 | | - _academy_id = _cur.execute("SELECT id FROM projects WHERE slug='evo-academy'").fetchone()[0] |
239 | | - _goals_seed = [ |
240 | | - ('evo-ai-100-customers', _evo_ai_id, '100 paying customers by Jun 30', 'customers', 'count', 100, '2026-06-30'), |
241 | | - ('evo-ai-billing-v2', _evo_ai_id, 'Ship billing v2', 'shipped', 'boolean', 1, '2026-05-31'), |
242 | | - ('evo-summit-200-tickets', _summit_id, 'Sell 200 tickets', 'tickets_sold', 'count', 200, '2026-04-13'), |
243 | | - ('evo-summit-3-sponsors', _summit_id, 'Close 3 sponsors', 'sponsors', 'count', 3, '2026-04-10'), |
244 | | - ('evo-academy-50-students', _academy_id, '50 beta students', 'students', 'count', 50, '2026-06-30'), |
245 | | - ] |
246 | | - for _gs in _goals_seed: |
247 | | - _cur.execute(""" |
248 | | - INSERT INTO goals (slug, project_id, title, target_metric, metric_type, target_value, current_value, status, created_at, updated_at) |
249 | | - VALUES (?, ?, ?, ?, ?, ?, 0, 'active', ?, ?) |
250 | | - """, (_gs[0], _gs[1], _gs[2], _gs[3], _gs[4], _gs[5], _now_seed, _now_seed)) |
251 | | - _conn.commit() |
| 213 | + # No seed data — Goals start empty. Users create Mission → Project → Goal via UI |
| 214 | + # or via the create-goal skill. Previous seed was Evolution-specific and leaked |
| 215 | + # into fresh installations of open-source users. |
252 | 216 | # --- End Goal Cascade migration --- |
253 | 217 |
|
254 | 218 | # --- Tickets migration (Feature 1.3) --- |
|
0 commit comments