Compatibility
Migration from cylex_phone
Copy player data from cylex_phone into FX Phone with one console command.
FX Phone can copy your players' cylex_phone data into its own tables with one console command. The cylex tables are only read. Nothing in them is changed or deleted, so cylex_phone keeps working if you go back.
cylex_phone is the only source the migration supports.
#What comes over
| cylex_phone | FX Phone |
|---|---|
| Phone users: number, IBAN, name, picture, job | Users (same number and IBAN where possible, see Conflicts) |
| Settings: theme, notification sound, silent, airplane, Wi-Fi, Bluetooth, volume, brightness, language, per-app notifications | Settings |
| Home screen, dock and widgets | Home screen, mapped to FX Phone apps. Apps FX Phone does not have are left out |
| Contacts and blocked numbers | Contacts and blocked numbers |
| Notes, alarms, mail | Notes (as plain text), alarms, mail |
| Messages: chats, groups, photos, videos, voice messages, locations, money sent and requested, replies, reactions, deleted messages | Messages |
| Company chats | Services chats (worker replies keep the worker's name) |
| Gallery, albums, favourites | Photos, albums, favourites |
Bank history, crypto (coins listed in Config.Crypto.Coins) |
Bank history, crypto |
| Billing | Invoices (company and personal, paid and unpaid) |
| Twitter: accounts, followers, tweets, retweets and quotes, likes, comments, comment likes, DMs | Chirp |
| Instagram: accounts, followers, posts, likes, comments, comment likes, live stories, DMs | Pixl |
| Swiper: accounts, profiles, swipes, matches, chats | Flame |
| Yellow Pages | Marketplace (car becomes vehicle; food, house, item, job, service stay) |
| News | News |
| Darkchat channels, members, nicknames, messages | Darkchat |
Players keep their social passwords and Darkchat channel passwords; FX Phone stores them hashed. Players stay signed in to the social account they had open in cylex_phone.
After the data is copied, each imported phone gets a registered eSIM with its number (the sims step).
#What does not come over
- Call history and pending notifications.
- cylex's automatic "I called you" chat messages.
- Apps FX Phone does not have: Health, Hacker, Frogly, Foffy, FrogEats, Racing, the games and similar.
- Rows older than
Config.Retention(messages, mail, Marketplace listings, posts, paid invoices, Darkchat). FX Phone would delete them on its first daily clean-up. To keep more, raise those values before you run the migration. - Expired stories, Flame swipes older than
Config.Dating.SwipeDays, Flame profiles under 18 or without photos. - Pictures hosted by cylex itself (stock wallpapers and default avatars). FX Phone uses its own defaults.
- Wallpapers and the phone colour. Every phone starts with the first wallpaper of
Config.Wallpapersand the colour inConfig.Variation. Add--wallpapersto the command to keep the picture a player had set as their own wallpaper. - The size of the phone on screen. Every phone starts at
Config.Scale. - "Set-up done". Every moved phone runs the FX Phone welcome set-up on its first open. It deletes nothing, and its first screen tells the player that their number, contacts, messages and photos came with them.
- Links that FX Phone does not accept (not
https, or on a host blocked inconfig_server.lua). - Whether a payment request in a chat was paid. Old requests come over as settled, because cylex_phone does not record it.
Every skipped row is counted in the report with the reason.
#How to run it
- Start FX Phone once so it creates its tables. Both resources must use the same database.
- Stop cylex_phone (
stop cylex_phone) and make sure no players are online. The real run refuses to start otherwise. - Back up the database.
- Dry run in the server console:
fxphone:migrate cylex dry. Nothing is written. Read the report: how many rows of each kind will come over, what is skipped and why, and every number, IBAN or username that changes. - Real run:
fxphone:migrate cylex run. - Verify. The report should show
okfor every step. Join the server and open Messages, Photos, Bank and Chirp on a character you know. - Restart FX Phone (or the server) so nothing it cached before the run is used.
bashfxphone:migrate cylex dry
fxphone:migrate cylex run
The report is printed in the console and saved to fx-phone/logs/migration-cylex-<mode>-<date>.txt.
Run the migration before players start using FX Phone.
#Command reference
The command runs from the server console only.
bashfxphone:migrate cylex [dry|run|resume] [--only=users,contacts,...] [--wallpapers]
| Part | Meaning |
|---|---|
dry |
Reads everything and writes nothing. This is the mode used when none is given |
run |
Copies the data. Refuses to start while players are online or while cylex_phone is started |
resume |
Continues a run that stopped. Same refusals as run |
--only= |
Runs only the named parts, comma separated |
--wallpapers |
Keeps the picture a player had set as their own wallpaper |
#If it stops
The data is copied in batches of 500 rows. Each batch is saved together with its position, so a crash or a server restart never leaves half a batch. Continue where it stopped with:
bashfxphone:migrate cylex resume
Steps that finished are never run twice. Running run again after a complete migration changes nothing.
#Only some parts
bashfxphone:migrate cylex dry --only=users,contacts,messages
Names: users, contacts, notes, alarms, mail, messages, services, media, bank, invoices, chirp, pixl, flame, marketplace, news, darkchat, sims, welcome, or a single step from the report such as chirp.posts. Some steps need an earlier one (likes need posts); the report says so when one is missing.
#Conflicts
cylex always wins. The report starts with a line that counts the existing FX Phone users and how many overlap with cylex, and lists every change below it.
- Characters in both (for example after a short test with FX Phone): the FX Phone side is cleared once, before anything is copied, and the character is imported from cylex with its cylex number, IBAN, settings, contacts and history. What FX Phone held for them is counted in the report and dropped, never mixed in or duplicated.
- Characters only in FX Phone are left alone, unless they hold a number or IBAN that a cylex player owns. Then the cylex player gets it back and the FX Phone character gets a new one from
ServerConfig.NumberGenerateorIbanGenerate. Its group chats and calls follow it; its one-to-one chats on the old number are dropped. - Numbers FX Phone cannot use (fewer than 3 digits, letters) are replaced by a new number. Chats, contacts and blocks follow the player to it.
- Social usernames become lower case with only
a-z 0-9 _ .. When two end up the same, the newer account gets a number at the end (ren,ren2). Renames are listed in the report.
#Welcome for moved players
The last step, welcome, records every moved player in the table fx_phone_migrated with how much came over: contacts, conversations, messages, photos and videos, notes, emails and social accounts. It gives each moved player:
- A "Your phone was renewed" notification, once, on their first open after the move. It is stored like any notification, so it waits on the lock screen across a relog until the player opens or clears it. Tapping it opens the Settings page below. Players who were not moved never get it.
- What's new cards after the welcome set-up. App names on them come from the locale files, so a renamed app shows its new name. A card for an app the server switched off is left out.
- A welcome gift at the phone shop: one purchase at a phone shop counter at a discount. It comes off at the checkout by itself, is used up only when a purchase goes through, and can be used once. See Phone shop.
- Settings > Carried Over from Your Old Phone: what came over, when, whether the gift is unused, used or expired, and a button to see the what's-new cards again. Only moved players have this row.
The gift is set in configs/config_migration.lua:
luaConfig.Migration = {
Gift = { Enabled = true, Percent = 50, Days = 14, MaxAmount = 0 },
}
| Option | Type | Default | What it changes |
|---|---|---|---|
Gift.Enabled |
boolean | true |
The welcome gift. false: no gift, and the notice and cards do not mention one |
Gift.Percent |
number | 50 |
Percent off one purchase, 1 to 100 |
Gift.Days |
number | 14 |
Days it stays valid, counted from the player's first open after the move |
Gift.MaxAmount |
number | 0 |
Most it may take off, in money. 0: no limit |
The discount is applied after any discount staff give and never takes the total below 0. See also Other configuration.
#Servers that moved with an earlier version
Players moved by a version that did not have the welcome step have no fx_phone_migrated record. FX Phone finds them by itself:
- On every start, while the cylex tables are still in the database and the
usersstep finished, every character incylex_phone_userdatawhose FX Phone phone was created by the migration is recorded. They then get the notice, the gift and the Settings page. Their counts are what they have in FX Phone the first time the Settings page is opened, marked as approximate. - If the cylex tables were dropped, a player is recognised only while their welcome set-up is not finished yet. A player who already finished it cannot be told apart from any other player and gets nothing.
Running fxphone:migrate cylex run again after updating runs the welcome step on its own, since every other step is done.
#How long it takes
The setup guide gives one reference: on a server with about 1,400 phones, 60,000 chat messages, 9,000 photos and 4,000 tweets, the dry run took under a minute and the real run a few minutes. Larger servers take proportionally longer. Run it while nobody is online.
#Rolling back
The safest way back is the database backup: restore it.
If FX Phone had no player data before the migration, you can instead empty the tables the migration filled:
sqlTRUNCATE fx_phone_users; TRUNCATE fx_phone_contacts; TRUNCATE fx_phone_blocked;
TRUNCATE fx_phone_notes; TRUNCATE fx_phone_alarms; TRUNCATE fx_phone_mail;
TRUNCATE fx_phone_conversations; TRUNCATE fx_phone_conversation_members;
TRUNCATE fx_phone_messages; TRUNCATE fx_phone_message_reactions;
TRUNCATE fx_phone_media; TRUNCATE fx_phone_albums; TRUNCATE fx_phone_album_items;
TRUNCATE fx_phone_transactions; TRUNCATE fx_phone_crypto; TRUNCATE fx_phone_invoices;
TRUNCATE fx_phone_accounts; TRUNCATE fx_phone_follows; TRUNCATE fx_phone_appdata;
TRUNCATE fx_phone_posts; TRUNCATE fx_phone_hashtags; TRUNCATE fx_phone_post_likes;
TRUNCATE fx_phone_post_comments; TRUNCATE fx_phone_comment_likes;
TRUNCATE fx_phone_stories; TRUNCATE fx_phone_story_views;
TRUNCATE fx_phone_dating_profiles; TRUNCATE fx_phone_dating_swipes; TRUNCATE fx_phone_dating_matches;
TRUNCATE fx_phone_listings; TRUNCATE fx_phone_news; TRUNCATE fx_phone_migrated;
DELETE FROM fx_phone_migration WHERE step LIKE 'cylex:%';
Do not do this if players already used FX Phone: it removes their FX Phone data too, and data the migration cleared or moved (see Conflicts) only comes back from the backup. The cylex_phone tables are untouched either way; start cylex_phone again to go back to it.
#Related
- cylex_phone compatibility for scripts that call cylex_phone exports
- Installation