# Ledger table

Even though the default table schema covers most use cases, there's room for customisation.

Here you'll find some of the changes that can be performed.

# Migrations

Currently, a migration file is included to create the necessary table schema for the package to function properly.

# Using a different prefix for the User ID/Type columns

Instead of the default user_id and user_type columns, a different prefix can be set:


Also make sure the accountant.user.prefix value in the configuration reflects this change:

return [
    // ...

    'user' = [
        'prefix' => 'accountable',


Refer to the User prefix section for more details.

# Using UUID instead of auto-incrementing ids

Some developers prefer to use UUID (opens new window) instead of auto-incrementing identifiers. Here is how the migration should look like for the user and recordable columns.

Update the User columns from




The Recordable columns should be updated from





Always make sure the user_* and recordable_* column types match the ones in their respective tables.

# Values with more than 255 characters

While odd, on some occasions, User Agent values may go over the 255 character mark. To avoid insertion problems, update the column from




# Using JSON column type instead of TEXT

The Laravel Query Builder (opens new window) supports querying JSON type columns.

By default, the properties, modified, pivot and extra columns store JSON data as TEXT, but the column types can be updated from




This change allows for extended data filtering capabilities.


Not all RDBMS support this feature, so check before making changes!