Upgrading & Version Guide
Understand the differences between Chatify v1 and v2, and how to migrate or stay on v1
Version overview
Chatify has two major versions. They are separate codebases -- v2 is not a drop-in upgrade from v1.
v1.x (^1.6) | v2.x | |
|---|---|---|
| Status | Stable (security fixes only) | Stable (active development) |
| Messaging | Direct (one-to-one) only | Direct, group, and saved messages |
| Frontend | jQuery + Blade | Vue 3 + Pinia + Tailwind CSS (IIFE bundle) |
| Broadcasting | Pusher only | Any Laravel broadcasting driver (Pusher, Reverb, etc.) |
| PHP | 7.3+ | 8.2+ |
| Laravel | 7 – 10 | 11, 12, 13 |
| Database | ch_messages, ch_favorites | ch_conversations, ch_conversation_participants, ch_messages, ch_favorites, ch_user_blocks, ch_user_settings |
| Config | chatify.php (flat) | chatify.php (nested, expanded) |
| Routes | /chatify + custom API | Versioned API at api/chatify/v1 + optional web UI |
| Models | ChMessage, ChFavorite | Conversation, ConversationParticipant, Message, Favorite, UserBlock, UserSetting |
| Auth | Session only | Session or Sanctum tokens |
Staying on v1
If you have an existing v1 installation and it works for your needs, you can continue using it.
composer require munafio/chatify:^1.6- The v1 documentation remains at chatify.munafio.com
- v1 receives security fixes only -- no new features
- The
^1.6constraint ensures Composer never pulls a v2 release
Starting fresh with v2
For new projects or major rebuilds, v2 is recommended.
composer require munafio/chatify
php artisan chatify:install --with-ui
php artisan migrateFollow the Getting Started guide in this documentation.
Migrating from v1 to v2
There is no automated migration path. The database schema, config format, routes, models, events, and frontend are all different.
Options
- Start fresh -- Install v2 on a clean database. Best for apps where chat history is not critical.
- Write a custom migration script -- Map your v1 data to the v2 schema manually.
Data mapping guide
If you choose option 2, here is how the v1 data maps to v2:
| v1 table / column | v2 equivalent |
|---|---|
ch_messages.from_id | Create a ch_conversations row (type direct), add both users to ch_conversation_participants, then insert into ch_messages with conversation_id and user_id = from_id |
ch_messages.to_id | The other participant in ch_conversation_participants |
ch_messages.body | ch_messages.body |
ch_messages.attachment | ch_messages.attachment (format changed -- v2 uses a JSON object with name, type, size) |
ch_messages.seen | Set last_read_at on the recipient's ch_conversation_participants row |
ch_favorites | ch_favorites (schema is similar, but references user_id and favorite_user_id) |
Key differences summary
| Concept | v1 | v2 |
|---|---|---|
| Config file | Flat keys (messenger_color, attachments.allowed_images, etc.) | Nested sections (colors.list, attachments.allowed_images, etc.) |
| Route prefix | chatify (hardcoded or via config) | API: api/chatify/v1 (configurable), Web: chatify (configurable) |
| User trait | Chatify\Traits\ChatifyMessenger | Chatify\Traits\InteractsWithChatify |
| Facade | Chatify | ChatifyMessenger |
| Events | Chatify\Events\MessageSent (single event) | 10 broadcast events (see Events) |
| Controllers | Single MessagesController | Separate controllers per resource (Conversation, Message, Contact, etc.) |
| Frontend build | Manual Blade + jQuery | php artisan chatify:build (Vue 3 + Vite IIFE) |
| Middleware env var | Not available | CHATIFY_API_MIDDLEWARE |
Version constraints in Composer
| Constraint | What you get |
|---|---|
^1.6 | Latest v1 patch. Never jumps to v2. |
^2.0@beta | Latest v2 beta. Requires minimum-stability: beta or the @beta flag. |
^2.0 | Stable v2 releases only. |