Skip to content

Database setup ​

ExchangePro uses Laravel migrations. All tables are created with:

bash
php artisan migrate

Supported databases ​

DriverUse case
mysqlProduction (recommended)
mariadbProduction
sqliteLocal development / quick demo

MySQL / MariaDB ​

1. Create database ​

sql
CREATE DATABASE exchangepro CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'exchangepro'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON exchangepro.* TO 'exchangepro'@'localhost';
FLUSH PRIVILEGES;

2. Configure .env ​

ini
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=exchangepro
DB_USERNAME=exchangepro
DB_PASSWORD=strong_password_here

3. Migrate ​

bash
php artisan migrate

Main tables (reference) ​

TablePurpose
usersCustomers and administrators (role: user | admin)
settingsKey-value JSON blobs (general, SEO, home page, etc.)
currenciesExchange currencies and rates
currency_pricesExternal/synced reference rates
currency_form_fieldsDynamic proof form schema
transactionsExchange orders
blogs, blog_categoriesBlog CMS
legal_pagesPolicy pages
support_tickets, support_ticket_replies, attachmentsSupport system
contact_submissionsContact form
subscribersNewsletter emails
ip_blocksIP deny rules
report_feature_submissionsFeedback
app_notificationsIn-app notifications
sessions, cache, jobsLaravel infrastructure

Home page default content is seeded via migration 2026_05_31_000002_seed_home_page_settings.php.

Seed data ​

Home page settings are seeded via migration 2026_05_31_000002_seed_home_page_settings.php.

For automated tests, use UserFactory (database/factories/UserFactory.php).

First administrator ​

ExchangePro does not create a default admin user in the database. After migrations and frontend install, open {FRONTEND_URL}/signup and register your account.

While no admin user exists, the first account created is automatically assigned role = admin. Every later signup receives role = user unless changed in the admin panel.

Register before going public

Anyone who completes /signup first on a publicly reachable site becomes administrator. Register yourself before sharing the URL. See First admin account.

Reset database (development) ​

bash
php artisan migrate:fresh

This deletes all data. Never run on production without backup.

Backup ​

Production backup example:

bash
mysqldump -u exchangepro -p exchangepro > backup-$(date +%F).sql

Schedule daily backups on your host.

Troubleshooting ​

ErrorFix
Access denied for userCheck DB credentials in .env
Base table or view not foundRun php artisan migrate
Specified key was too longUse utf8mb4; MySQL 5.7+ or MariaDB 10.3+

Need help? support@xorinlab.com · Website: xorinlab.com