Migration from nc-banking V1 to V2
Not recommended for most servers.
The safest way to use nc-banking V2 is as a fresh install on a new server or
with a clean database. This page is only for advanced users who must keep
existing V1 player data.
Should you migrate?
Before doing anything, decide if you really need migration.
Recommended
- New server or wipe is acceptable.
- You can afford to reset banking data (accounts, loans, invoices, cards).
- → Use V2 as a fresh install and ignore this page.
Migration (not recommended)
- You already run nc-banking 1.0.4 in production.
- You have important live data (balances, loans, invoices) you cannot wipe.
- You understand SQL backups and can restore your DB if anything goes wrong.
If you are not comfortable restoring backups, do not attempt migration.
What changes between V1 and V2?
Resource structure
Comparing resources/nc-banking104 (V1) with resources/nc-banking (V2):
V1 (1.0.4)
- Client scripts:
client/main.luaclient/atm_spawn.luaclient/billing.luaclient/atm_calibration.lua
- Server scripts:
server/main.luaserver/discord.luaserver/version.lua
- UI:
html/index.html(bank UI)html/billing.html(billing app)
- Config/DB:
config/config.lua(V1 options only)sql/install.sql(core banking tables)
- Client scripts:
V2 (2.0.0) adds on top of that:
- Client scripts:
client/banking_job.lua— banking job + branch owner logicclient/tablet.lua— teller tablet NUI bridgeclient/tablet_calibration.lua— tablet camera/calibration
- Server scripts:
server/banking_job.lua— branches, vaults, employees, fees
- UI / assets:
html/tablet.html— teller tablet & owner dashboard UItablet_screen.json— tablet calibration dataweb/— NUI source (for development, not required in production)
- Config:
Config.BankingJoband related V2 options inconfig/config.lua.
- Client scripts:
Database schema
Both V1 and V2 share the same core tables, defined in sql/install.sql:
nc_banking_accountsnc_banking_transactionsnc_banking_savingsnc_banking_loansnc_banking_invoicesnc_banking_savings_goalsnc_banking_interest_historync_banking_personalnc_banking_businessnc_banking_sharednc_banking_shared_membersnc_banking_atmsnc_banking_cards
V2 adds branch-related tables at runtime from server/banking_job.lua (not in install.sql):
nc_banking_branch_ownershipnc_banking_branch_employeesnc_banking_branch_labelsnc_banking_branch_vaultsnc_banking_branch_vault_logsnc_banking_branch_feesnc_banking_branch_zones- plus an extra
branch_idcolumn onnc_banking_atms
On first start, V2 will:
- Create the new branch tables if they do not exist.
- Add
branch_idcolumn tonc_banking_atmsif it is missing. - Leave all existing V1 data (accounts, loans, invoices, etc.) as-is.
Because of this, a V1 → V2 migration is mostly about replacing the resource while
keeping the existing database.
High-level migration plan
- Prepare and test on a copy of your server if possible.
- Take full backups (DB + resource).
- Replace V1
nc-bankingwith V2nc-banking. - Merge your
config/config.luachanges carefully. - Start the server once, let V2 create new tables/columns.
- Decide if you enable the banking job & branches now or later.
- Test core banking features and only then expose V2 features to players.
Step 1: Backup everything
Do not skip this step.
Database backup
- Dump your entire database, or at minimum all tables that start with
nc_banking_. - Example (MySQL CLI):
mysqldump -u user -p your_database nc_banking_accounts nc_banking_transactions ... > nc_banking_backup.sql
- Dump your entire database, or at minimum all tables that start with
Resource backup
- Copy the whole V1 resource folder somewhere safe:
resources/nc-banking104/ # keep as reference resources/nc-banking/ # current live V1, will become V2 - Or simply zip
resources/nc-bankingand store it.
- Copy the whole V1 resource folder somewhere safe:
Step 2: Replace the resource
- Stop your server, or at least stop the
nc-bankingresource. - Replace the live resource:
- Delete or move the existing
resources/nc-banking(V1) out of theresourcesfolder. - Copy the new V2
nc-bankingfolder intoresources.
- Delete or move the existing
- Confirm the manifest:
- V2
fxmanifest.luashould showversion '2.0.0'. - Client scripts list should include
client/banking_job.luaandclient/tablet.lua. - Server scripts list should include
server/banking_job.lua.
- V2
Your V1 folder resources/nc-banking104 can stay as a reference only; it is
not used by the server.
Step 3: Merge configuration changes
The config file changed between V1 and V2, especially for:
- New ATM fee behaviour and confirmations
- Banking job & branches (
Config.BankingJob) - Owner dashboard and tablet settings
Recommended approach
- Open V2
config/config.lua(fresh file from new resource). - Open your old V1
config/config.lua(fromnc-banking104). - Manually copy your custom values from V1 into the V2 file:
- Framework / locale / inventory / target settings
- Custom minimum amounts, limits, interest, etc.
- Any integration flags you changed.
- Leave new V2 sections (like
Config.BankingJob) intact unless you really
know what you are doing.
Banking job toggle
- To delay using the banking job/branches and keep behaviour close to V1:
Config.BankingJob.enabled = false - To start using the job/branches after migration:
Config.BankingJob.enabled = true
You can migrate with enabled = false first, verify that all player data and
basic banking still works, then enable the job later.
Step 4: First start on V2
- Ensure in
config/config.lua:Config.AutoInstallSQL = true - Start the server (or
ensure nc-banking). - Watch the console:
- The usual nc-banking tables should be detected as existing.
- New tables (branch ownership, employees, vaults, fees, zones) should be
created automatically. nc_banking_atmsshould be altered to addbranch_idif it was missing.
If you see any SQL errors, stop the server immediately and restore your
backup before trying again.
After a successful start, you may set Config.AutoInstallSQL = false again if
you prefer.
Step 5: Post-migration checks
Before letting players back in, verify:
- Player accounts
- Use your admin tools to check a few players:
- Balances look correct.
- Savings, personal, business, shared accounts still exist.
- Use your admin tools to check a few players:
- Transactions & loans
- Open the bank and ATM UIs to make sure:
- Transaction history loads.
- Existing loans show correctly.
- Open the bank and ATM UIs to make sure:
- Invoices
- Check that pending invoices are visible and payable.
- Cards
- Existing cards still work (if you used the card system in V1).
Only after these pass should you:
- Enable
Config.BankingJob.enabled = true(if you plan to). - Start testing branch purchase, owner dashboard, teller tablet.
When to roll back
Immediately restore your backup and return to V1 if:
- Core tables are corrupted or missing data.
- Players report missing balances or accounts.
- SQL errors occur repeatedly on every start.
Because V2 alters the nc_banking_atms table and creates new tables, rolling
back is easiest if you restore the full DB dump and the old nc-banking
resource together.
Summary
- For new servers or wipes, use V2 as a fresh install and ignore V1
migration entirely. - For live servers that must keep V1 data, migration is possible but not
officially recommended. - Always:
- Back up your DB and resource.
- Test on a copy first if you can.
- Keep
nc-banking104as a reference only; production should run only onenc-bankingresource (the V2 one).