-
Notifications
You must be signed in to change notification settings - Fork 3
Database Schema
PHPCRM edited this page Dec 1, 2025
·
1 revision
PHPCRM uses a clean and optimized MySQL database design.
Each table serves a dedicated CRM function such as leads, customers, tasks, users and system operations.
Below is the complete database schema overview with table purpose.
| Table Name | Purpose |
|---|---|
| users | CRM users / admin login |
| customers | Customer details and business information |
| leads | Lead / enquiry records before conversion |
| tasks | Follow-ups, reminders and assigned tasks |
| notes | Notes and communication history |
| settings | General application configuration |
Stores login credentials and user profile information.
| Column | Description |
|---|---|
| id | Primary key |
| name | Full name |
| Login email | |
| password | Hashed password |
| role | User role (admin/standard) |
| created_at | Record created timestamp |
Stores customer database information.
| Column | Description |
|---|---|
| id | Primary key |
| name | Customer name |
| phone | Contact number |
| address | Address / location |
| created_by | Which user added the customer |
| created_at | Timestamp |
Tracks enquiries / sales opportunities before conversion to customers.
| Column | Description |
|---|---|
| id | Primary key |
| name | Person / company name |
| phone | Contact number |
| status | Lead stage (new / working / converted / closed) |
| source | Lead origin (website / phone / campaign etc.) |
| assigned_to | User handling the lead |
| created_at | Timestamp |
Stores tasks / follow-ups / reminders.
| Column | Description |
|---|---|
| id | Primary key |
| lead_id / customer_id | Related record |
| task | Task description |
| due_date | Target date |
| status | Pending / completed |
| assigned_to | Staff member |
| created_at | Timestamp |
Stores communication history with leads / customers.
| Column | Description |
|---|---|
| id | Primary key |
| lead_id / customer_id | Associated record |
| note | Note / update text |
| created_by | User who logged note |
| created_at | Timestamp |
Stores CRM-wide basic configurations.
- One Lead can have multiple Tasks
- One Lead can have multiple Notes
- One Customer can have multiple Tasks
- One Customer can have multiple Notes
- Each record contains
created_byorassigned_toreferring touserstable
- Lightweight database
- No unnecessary columns
- Easy to extend with migration support
- Developer-friendly modification
For guidelines on adding new fields or modules โ
๐ See Customization Guide (coming next)
If you want to understand modules โ
๐ See Modules Overview