iachat/db/migrate
Rodribm10 95d3e99652 feat(retention): version the Jasmine + Daniela prompts as seed files
The orchestrator prompt (Jasmine) and scenario instruction (Daniela)
live in the database. When we merge this branch to main and deploy to
production, the prod DB will keep its OLD prompts — the new ones would
only exist in staging. That defeats the point of merging.

Fix: commit the current staging prompts as .md files under
db/seed_prompts/ and add a data migration that syncs them into the DB
on deploy. Idempotent (no-ops when content already matches).

From now on, prompt changes follow the same workflow as code: edit the
.md file, migration resyncs on deploy. The DB row becomes a mirror of
the file, not the source of truth.
2026-04-22 11:00:06 -03:00
..
20230426130150_init_schema.rb chore: Squash migrations till 05/2023 (#8862) 2024-02-06 17:00:38 +04:00
20230503101201_create_sla_policies.rb feat: SLA CRUD APIs (EE) (#7027) 2023-05-11 22:42:56 +05:30
20230509101256_add_index_to_messages_created_at.rb feat(perf): add index to messages created at (#7044) 2023-05-10 11:34:49 +05:30
20230510060828_add_index_to_messages_for_reportings.rb feat: add index migration (#7050) 2023-05-10 17:55:14 +05:30
20230510113208_set_default_empty_string_for_contact_name.rb chore: Add migration to set the default empty string value for contact name (#7052) 2023-05-11 17:35:19 +05:30
20230515051424_update_article_image_keys.rb Revert "chore: Upgrade Rails to 7.2.2 and update Gemfile dependencies (#11037)" 2026-02-03 21:09:42 -08:00
20230523104139_add_partial_index_for_resolved_contacts.rb feat(perf): contacts query performance (#7175) 2023-05-23 17:22:47 +05:30
20230525085402_add_custom_sender_name_toggle.rb feat: Ability to customise the email sender name [CW-1629] (#7345) 2023-07-04 20:46:01 +05:30
20230608040738_add_processed_message_content_to_messages.rb fix: Automations condition based quoted text (#7272) 2023-06-09 17:00:05 +05:30
20230612103936_add_index_to_reporting_events.rb feat: add index to reporting events [CW-1960] (#7294) 2023-06-12 18:23:42 +05:30
20230614044633_add_sender_name_to_in.rb feat: Ability to customise the email sender name [CW-1629] (#7345) 2023-07-04 20:46:01 +05:30
20230620132319_add_sla_policy_to_conversations.rb chore: Add sla policy association to conversation (#7360) 2023-06-21 14:48:50 +05:30
20230620212340_add_waiting_since_to_conversations.rb feat: Add a sort option for conversations waiting for a reply from an agent (#7364) 2023-06-21 13:20:39 -07:00
20230706090122_sentiment_column_to_messages.rb feat: Sentiment Analysis (#7475) 2023-07-12 15:03:31 +05:30
20230714054138_add_api_key_sid_to_twilio_sms.rb feat: Add support for API key authentication in Twilio (#7523) 2023-07-14 19:20:54 -07:00
20230727065605_add_partial_index_contact_account_id.rb feat(perf): contact page loading speed (#7629) 2023-07-27 13:32:22 +05:30
20230801180936_update_default_status_in_hooks.rb fix: Update the default status of the hooks to enabled (#7652) 2023-08-01 12:14:47 -07:00
20230905060223_add_regex_to_custom_attribute_definition.rb feat: Support Regex validation for custom attributes (#7856) 2024-01-23 18:01:57 +04:00
20231011041615_ensure_message_private_not_null.rb chore: Ensure null validation for private attribute in messages (#8085) 2023-10-11 13:16:59 +05:30
20231013072802_add_icon_to_categories.rb feat: Adds the ability to set an emoji for help center category (#8111) 2023-10-20 13:52:30 +05:30
20231114111614_change_feature_flags_to_bigint_in_accounts.rb feat: convert feature_flag to bigint [CW-2767] (#8350) 2023-11-17 15:50:24 -08:00
20231129091149_add_snoozed_until_to_notifications.rb feat: Snooze notification API (#8439) 2023-12-04 12:32:35 +05:30
20231201014644_remove_notifications_with_message_primary_actor.rb chore: Change primary actor to Conversation for all the notification types. (#8435) 2023-12-06 10:43:09 +05:30
20231211010807_add_cached_labels_list.rb chore(migration): Re-run database migration job for caching. (#8581) 2023-12-18 17:29:02 -08:00
20231219000743_re_run_cache_label_job.rb chore(migration): Re-run database migration job for caching. (#8581) 2023-12-18 17:29:02 -08:00
20231219073832_add_last_activity_at_to_notifications.rb feat: Add last_activity_at field to Notification model (#8585) 2023-12-20 13:02:37 +05:30
20231223033019_refactor_sla_policy_columns.rb feat: sla 1 - refactor sla_policies model and add applied_sla model (#8602) 2024-01-23 23:48:02 +05:30
20231223040257_create_applied_slas.rb feat: sla 1 - refactor sla_policies model and add applied_sla model (#8602) 2024-01-23 23:48:02 +05:30
20240124054340_add_contact_type_to_contacts.rb feat: Add contact_type attribute to contact model (#8768) 2024-01-24 12:26:47 +05:30
20240124084032_add_middle_name_and_last_name_to_contacts.rb feat: Add middle_name and last_name to contact model (#8771) 2024-01-24 16:22:04 +05:30
20240129080827_add_location_and_country_code_to_contacts.rb feat: Add attributes location and country_code to Contact model (#8803) 2024-01-29 14:10:14 +05:30
20240131040316_remove_imap_inbox_syned_at_from_channel_email.rb chore: Remove unused attribute imap_inbox_synced_at (#8822) 2024-01-31 11:48:46 +04:00
20240207103014_change_applied_sla_sla_status_to_enum.rb feat: Add sidekiq jobs to monitor applied SLAs (#8828) 2024-02-07 21:44:56 +04:00
20240213131252_add_blocked_to_contacts.rb feat: Ability to block contacts permanently (#8922) 2024-02-21 14:18:42 -08:00
20240215065844_add_meta_to_notifications.rb feat: Add meta to notification model (#8941) 2024-02-16 14:38:02 +05:30
20240216055809_add_unique_index_to_applied_slas.rb feat: sla-7 ensure applied_sla uniqueness (#8938) 2024-02-20 21:59:49 +05:30
20240306201954_change_identifier_type_in_notifications_subscriptions.rb fix: Change the column identifier from string to text to avoid overflow (#9073) 2024-03-07 11:13:01 +05:30
20240319062553_create_sla_events.rb feat: add sla events table (#9126) 2024-03-20 11:59:37 +05:30
20240322071629_convert_cached_label_list_to_text.rb fix: Convert cached_label_list to text (#9143) 2024-03-25 18:47:08 -07:00
20240415210313_add_channel_web_widget_to_portals.rb feat: Add widget to help center config (#9235) 2024-04-15 16:46:48 -07:00
20240515201632_index_improvements_conversations_contacts.rb chore: Improved indexes for Conversations & Contacts [CW-3300] (#9475) 2024-05-15 16:10:39 -07:00
20240516003531_add_index_for_message_type_account_date.rb chore: Add indexes to improve reporting performance (#9478) 2024-05-15 21:21:15 -07:00
20240726220747_add_custom_roles.rb feat: Add APIs to manage custom roles in Chatwoot (#9995) 2024-08-23 17:18:28 +05:30
20240923215335_add_locale_to_article.rb fix: Include uncategorized articles in the all article section to allow edit/delete (#10153) 2024-09-23 23:39:03 -07:00
20241217041352_fix_old_audio_alert_data.rb fix: Update old data to fix login issues (#10594) 2024-12-17 17:17:11 +05:30
20250104200055_create_captain_tables.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250104210328_remove_robin_tables.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250105001414_add_status_to_captain_documents.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250105005821_remove_not_null_from_captain_documents.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250107030743_add_config_to_captain_assistant.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250108031358_create_captain_inbox.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250108211541_remove_index_from_captain_assistants.rb feat(ee): Add Captain features (#10665) 2025-01-14 16:15:47 -08:00
20250116000103_add_status_to_captain_assistant_responses.rb feat: Add a review step for FAQs generated from conversations before using it (#10693) 2025-01-16 09:54:34 +05:30
20250116061033_convert_document_to_polymorphic_association.rb fix(ce): Check the edition before running the data migration (#10728) 2025-01-21 10:00:37 +05:30
20250207040150_add_meta_to_attachment.rb feat: Show shared contact's name in Telegram channel (#10856) 2025-02-11 19:39:54 +05:30
20250228185548_add_internal_attributes_to_accounts.rb feat: Add support for account abuse detection (#11001) 2025-02-28 15:28:19 -08:00
20250314185939_add_provider_connection_to_whatsapp.rb feat: baileys provider for whatsapp (#7) 2025-04-03 23:28:38 -03:00
20250315202035_add_index_to_articles.rb chore: Limit the number of articles retrieved by widget (#11095) 2025-03-15 14:10:12 -07:00
20250326034635_add_instagram_channel.rb feat: Added Instagram channel migration (#11181) 2025-03-26 11:12:32 +05:30
20250402233933_remove_portal_members.rb chore: Clean up report & knowledge base policies (#11234) 2025-04-03 16:00:32 -07:00
20250410061725_convert_csml_bots_to_webhook_bots.rb feat: Implement UI for Agent Bots in settings and remove CSML support (#11276) 2025-04-16 18:02:49 +05:30
20250416182131_flip_chatwoot_v4_default_feature_flag_installation_config.rb chore: Enable chatwoot_v4 feature flag by default for accounts (#11321) 2025-04-17 08:53:37 +05:30
20250421082927_add_settings_column_to_account.rb feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
20250421085134_update_auto_resolve_to_mminutes.rb feat: Add support for minutes in auto resolve feature (#11269) 2025-05-07 00:36:15 -07:00
20250512231036_create_copilot_threads.rb feat: Add support for persistent copilot threads and messages (#11489) 2025-05-15 17:37:04 -07:00
20250512231037_create_copilot_messages.rb feat: Add support for persistent copilot threads and messages (#11489) 2025-05-15 17:37:04 -07:00
20250514045638_add_csat_config_to_inboxes.rb feat: Improve CSAT responses (#11485) 2025-05-16 14:18:52 +05:30
20250523024825_remove_uuid_from_copilot_threads.rb feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
20250523024826_remove_user_id_from_copilot_messages.rb feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
20250523031839_change_message_type_to_integer_in_copilot_messages.rb feat: Add support for realtime-events in copilot-threads and copilot-messages (#11557) 2025-05-22 22:25:05 -07:00
20250620120000_create_channel_voice.rb feat: Whatsapp embedded signup (#11612) 2025-07-14 21:37:06 -07:00
20250627195529_add_index_to_messages.rb fix: disable_ddl_transaction! on add_index action (#11833) 2025-06-27 16:58:50 -07:00
20250709102213_add_template_params_to_campaigns.rb chore(annotations): sync model annotations with current schema (#12245) 2025-08-20 20:23:42 +02:00
20250710145708_create_captain_scenarios.rb feat: add Captain::Scenario Model and API [CW-4597] (#11907) 2025-07-14 16:12:38 +05:30
20250714104358_add_response_guidelines_and_guardrails_to_captain_assistants.rb feat: add response guidelines and guardrails field (#11911) 2025-07-15 08:56:03 +05:30
20250722083820_add_ssl_settings_to_portals.rb chore: Automate SSL with Cloudflare (#12021) 2025-07-24 13:09:06 +04:00
20250722152516_add_index_on_contact_type_and_account_id_to_contacts.rb feat: Introduce the crm_v2 feature flag for CRM changes (#12014) 2025-07-23 17:07:02 +04:00
20250726142410_add_whatsapp_channel_provider_index.rb feat: baileys connection period check (#87) 2025-07-26 11:38:16 -03:00
20250805082345_add_metadata_to_captain_documents.rb feat: Add BE changes for captain pdf support for faq generation (#12113) 2025-08-27 20:31:22 +05:30
20250805160307_add_notifications_performance_index.rb perf: fix notifications duplicate query and add composite index (#12110) 2025-08-07 15:59:40 +05:30
20250806140000_create_assignment_policies.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250806140001_create_inbox_assignment_policies.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250806140002_create_agent_capacity_policies.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250806140003_create_inbox_capacity_limits.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250806140004_add_agent_capacity_policy_to_account_users.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250806140005_create_leaves.rb feat: Add migration files for assignment v2 (#12147) 2025-08-11 21:44:38 -07:00
20250808123008_add_feature_citation_to_assistant_config.rb fix(migrations): skip AddFeatureCitationToAssistantConfig on OSS (#12244) 2025-08-20 19:15:19 +05:30
20250820130619_add_two_factor_to_users.rb feat: MFA (#12290) 2025-09-18 20:19:24 +05:30
20250822061042_add_content_templates_to_twilio_sms.rb feat: Added the backend support for twilio content templates (#12272) 2025-08-24 10:05:15 +05:30
20250825070005_create_account_saml_settings.rb feat: add saml model & controller [CW-2958] (#12289) 2025-09-03 13:30:42 -07:00
20250826000000_drop_telegram_bots.rb chore: remove unused telegram bot model (#12417) 2025-09-11 22:25:26 +05:30
20250916024703_add_allowed_domains_to_channel_widgets.rb feat: Introduce allowed_domains for web widget (#12450) 2025-09-17 10:01:27 +05:30
20250917012759_add_verified_to_channel_email.rb feat: Clean up email configuration for from and reply to emails (#12453) 2025-09-24 11:36:53 -07:00
20250928173414_recreate_whatsapp_channel_provider_connection_index.rb feat(zapi): Z-API integration (#115) 2025-10-15 16:23:04 -03:00
20250929105219_create_companies.rb feat: Add company model and API with tests (#12548) 2025-10-08 07:53:43 -07:00
20250929132305_add_company_to_contacts.rb feat: Add company model and API with tests (#12548) 2025-10-08 07:53:43 -07:00
20251003091242_create_captain_custom_tools.rb feat(ee): Captain custom http tools (#12584) 2025-10-06 07:53:15 -07:00
20251021082242_add_unique_index_to_companies_domain.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
20251022152158_add_index_to_conversations_identifier.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
20251022162159_add_assignee_agent_bot_id_to_conversations.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
20251027091242_add_tiktok_channel.rb feat: TikTok channel (#12741) 2025-12-17 07:54:50 -08:00
20251111094402_add_contacts_count_to_companies.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
20251114173609_change_source_id_to_text.rb Chore/merge upstream 4.8.0 (#150) 2025-11-19 16:25:58 -03:00
20251117003944_add_show_on_sidebar_to_dashboard_apps.rb feat: dashboard apps on sidebar (#146) 2025-11-19 14:44:18 -03:00
20251119161025_change_messages_source_id_to_text.rb fix: Change messages.source_id to text column (#12908) 2025-11-20 11:41:41 +05:30
20251227223543_add_encrypted_wuzapi_tokens_to_channel_whatsapp.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20251227230000_rename_wuzapi_tokens.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20251229081141_change_webhook_url_to_text.rb fix: the webhook url to be text (#13157) 2026-01-06 15:23:54 +05:30
20260112092041_remove_country_code_from_conversation_filters.rb fix: country_code should be checked against the contact (#13186) 2026-01-13 14:47:27 +05:30
20260114192518_add_internal_observations_to_csat_survey_responses.rb feat(ee): Review Notes for CSAT Reports (#13289) 2026-01-15 19:53:57 -08:00
20260114201315_add_observations_audit_to_csat_survey_responses.rb feat(ee): Review Notes for CSAT Reports (#13289) 2026-01-15 19:53:57 -08:00
20260120121402_enable_captain_tasks_for_existing_accounts.rb feat: new Captain Editor (#13235) 2026-01-21 13:39:07 +05:30
20260121190545_create_scheduled_messages.rb feat: mensagens agendadas (#198) 2026-01-30 22:08:16 -03:00
20260130061021_add_index_to_reporting_events_for_response_distribution.rb fix: Increase the parallelism config to fix flaky tests, revert bad commits (#13410) 2026-01-30 12:49:31 -08:00
20260201162122_change_scheduled_messages_author_to_nullable.rb chore: general improvements (#204) 2026-02-01 14:25:06 -03:00
20260222230832_add_cert_content_to_captain_units.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260223035055_add_webhook_configured_at_to_captain_units.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260223142442_add_typing_delay_to_inboxes.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260225003000_add_proactive_pix_polling_to_captain_units.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260225160000_create_captain_gallery_items.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260226002000_add_scope_and_inbox_to_captain_gallery_items.rb chore(style): fix rubocop offenses and update typing indicators 2026-02-25 15:06:58 -03:00
20260226222000_create_captain_unit_inboxes.rb feat(units): allow one Pix unit to link to multiple inboxes (N:N) 2026-02-26 21:33:23 -03:00
20260226230000_create_captain_conversation_insights.rb feat(captain): improve suite photo search accuracy with AI guidance 2026-02-26 23:04:28 -03:00
20260226230001_create_captain_report_snapshots.rb feat(captain): improve suite photo search accuracy with AI guidance 2026-02-26 23:04:28 -03:00
20260227030000_add_inbox_id_to_captain_conversation_insights.rb feat(captain): add AI reports page with insights generation 2026-02-27 07:05:58 -03:00
20260227120000_add_orchestrator_prompt_to_captain_assistants.rb feat: Adiciona prompt orquestrador configurável para assistentes Captain com editor UI. 2026-02-27 11:57:59 -03:00
20260301120000_create_captain_notification_templates.rb feat: sistema de notificações de reserva com templates configuráveis 2026-03-01 21:53:11 -03:00
20260301200000_change_notification_templates_to_inbox.rb refactor: move notification templates de units para inboxes 2026-03-01 22:17:27 -03:00
20260302091000_add_message_signature_default_name_to_inboxes.rb feat: lead attribution tracking - landing page origin detection 2026-03-02 14:40:35 -03:00
20260302092000_add_shift_signatures_to_inboxes.rb feat: lead attribution tracking - landing page origin detection 2026-03-02 14:40:35 -03:00
20260302093000_add_night_shift_hours_to_inboxes.rb feat: lead attribution tracking - landing page origin detection 2026-03-02 14:40:35 -03:00
20260302154630_create_lead_clicks.rb feat: lead attribution tracking - landing page origin detection 2026-03-02 14:40:35 -03:00
20260302154737_create_landing_hosts.rb feat: lead attribution tracking - landing page origin detection 2026-03-02 14:40:35 -03:00
20260302172500_add_click_id_to_lead_clicks.rb feat: add landing click attribution tracking and stats endpoint 2026-03-02 17:37:28 -03:00
20260302211000_add_auto_label_to_landing_hosts.rb feat(landing): add public LP flow, attribution labels, and report filters 2026-03-02 18:57:22 -03:00
20260303013420_add_visual_config_to_landing_hosts.rb feat: configuração de landing pages por domínio e generalização da galeria 2026-03-03 11:19:41 -03:00
20260303074000_add_config_to_landing_hosts.rb feat: configuração de landing pages por domínio e generalização da galeria 2026-03-03 11:19:41 -03:00
20260303172517_add_visual_fields_to_landing_hosts.rb fix(landing-page): update model/schema attributes and eslint warnings 2026-03-03 14:30:06 -03:00
20260413000001_fix_orchestrator_prompt_delimiter_position.rb feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
20260415040927_create_captain_lifecycle_tables.rb feat(lifecycle): add captain_lifecycle_* tables and concierge columns on captain_units 2026-04-15 01:10:49 -03:00
20260415040957_add_concierge_to_captain_units.rb feat(lifecycle): add captain_lifecycle_* tables and concierge columns on captain_units 2026-04-15 01:10:49 -03:00
20260419023642_create_captain_contact_memories.rb docs(captain-memory): document intentional omission of secondary FKs 2026-04-18 23:49:21 -03:00
20260419024929_add_cascade_to_captain_contact_memories_foreign_keys.rb feat(captain-memory): cascade delete memories on account/contact removal (LGPD) 2026-04-18 23:50:14 -03:00
20260421120001_seed_daniela_passo_zero_scenario.rb feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
20260421120002_seed_reclamacoes_ouvidoria_scenario.rb feat(captain): semantic memory fixes + roleta + reclamações + analytics 2026-04-21 15:36:25 -03:00
20260422094015_add_retention_stats_to_contacts.rb feat(retention): foundation for customer retention metrics 2026-04-22 09:50:23 -03:00
20260422105901_seed_jasmine_and_daniela_prompts.rb feat(retention): version the Jasmine + Daniela prompts as seed files 2026-04-22 11:00:06 -03:00