Appearance
Core tables ​
Overview ​
Workspaces, admin users, membership, roles and permissions, authentication (Passport, WebAuthn, SAML SSO), subscription and billing, announcements and notification settings, logs and the queue tables. 52 tables. The schema is the result of replaying every migration in filename order at commit f517b6b. Relation types are explained on the Database overview.
Workspaces, users, roles and permissions ​
workspaces is the tenant. Admin users (users) join a workspace through workspace_users, and get a role per workspace and module through role_user. users has no workspace_id; workspaces.user_id is the owner (checked by VerifyWorkspaceOwner) and workspaces.parent_id (no foreign key) points at a parent workspace.
Solid lines are foreign keys in the migrations; dotted lines are relations that exist only in the models. Tables from other pages appear without their own section here.
workspaces ​
The tenant. One row per workspace (customer account), with branding, custom domain, cloud-storage tokens and feature flags.
Model: Workspace · Created in 2020_03_19_190051_create_workspaces_table.php · changed by 8 later migrations (latest update/2026_09_28_000004_add_sso_enabled_to_workspaces_table.php)
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
url_slug | varchar(255) | no | ||
name | varchar(255) | no | ||
user_id | bigint unsigned | no | Comment: must be a user id; FK → users.id | |
parent_id | bigint unsigned | yes | ||
user_email | varchar(255) | no | ||
user_phone | varchar(255) | yes | ||
address_line_1 | text | yes | ||
address_line_2 | text | yes | ||
city | varchar(255) | yes | ||
state | varchar(255) | yes | ||
zip_code | varchar(255) | yes | ||
timezone | varchar(255) | no | UTC | |
logo | varchar(255) | yes | ||
recovery_phone | varchar(255) | yes | ||
recovery_email | varchar(255) | yes | ||
dropbox_token | text | yes | ||
gdrive_access_token | text | yes | ||
gdrive_refresh_token | text | yes | ||
box_access_token | text | yes | ||
box_refresh_token | text | yes | ||
box_access_token_ttl | int | no | ||
box_acquired_at | int | no | ||
api_key | varchar(255) | yes | ||
secrete_key | varchar(255) | yes | ||
status | enum(0,1) | no | 1 | |
project_number_first_string | varchar(255) | yes | ||
project_number_second_string | varchar(255) | yes | ||
project_number_third_string | varchar(255) | yes | ||
is_prefix | enum(0,1) | no | 1 | |
asana_id | bigint unsigned | yes | ||
created_by | bigint unsigned | yes | FK → users.id | |
enable_notification | tinyint | no | 1 | Comment: 0=Disable, 1=Enable |
pause_notification | tinyint | no | 1 | Comment: 0=Disable, 1=Enable |
lm_notification | tinyint | no | 1 | Comment: 0=Disable, 1=Enable |
no_of_child | int | no | 0 | |
dealership_no | varchar(255) | yes | ||
display_salary | enum(0,1) | no | 1 | Comment: 0=False, 1=True |
dealership_no_status | enum(0,1) | no | 0 | Comment: 0=False, 1=True |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
dam_notification | tinyint | no | 1 | Comment: 0=disable, 1=enable |
dropbox_connect | tinyint(1) | no | 0 | Comment: 0=disconnected, 1=connected |
gdrive_connect | tinyint(1) | no | 0 | Comment: 0=disconnected, 1=connected |
box_connect | tinyint(1) | no | 0 | Comment: 0=disconnected, 1=connected |
url | varchar(255) | yes | ||
cname | varchar(255) | yes | ||
domain_status | enum(hidden,pending,verified,unverified) | no | hidden | |
max_instances | int | no | 1 | |
white_label_enabled | tinyint(1) | no | false | |
tagline | longtext | yes | ||
favicon | varchar(255) | yes | ||
support_email | varchar(255) | yes | ||
white_label_name | varchar(255) | yes | ||
sso_enabled | tinyint(1) | no | 0 | Comment: Allowed by Collage support; gates the SSO settings page and all SSO sign-ins |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | User::getWorkspaceDetails(), Workspace::owner(), User::workspaces() (swapped keys) |
parent_id | not declared | Column only | - | - |
created_by | users.id | FK | cascade | - |
Referenced by: announcement_systm_notifications.workspace_id, announcement_users.workspace_id, announcements.workspace_id, assets_versions.workspace_id, categories.workspace_id, dam_acl.workspace_id, dam_asset_order_settings.workspace_id, dam_asset_product_carts.workspace_id, dam_asset_product_order_items.workspace_id, dam_asset_product_order_shippings.workspace_id, dam_asset_product_orders.workspace_id, dam_asset_products.workspace_id, dam_asset_watermark_settings.workspace_id, dam_assets_converts.workspace_id, dam_collections.workspace_id, dam_external_apps.workspace_id, dam_group_users.workspace_id, dam_groups.workspace_id, dam_instance_permissions.workspace_id, dam_instances.workspace_id, dam_notifications.workspace_id, dam_search_histories.workspace_id, dam_system_notifications.workspace_id, dam_tiles.workspace_id, dam_user_addresses.workspace_id, dam_user_notifications.workspace_id, dealer_users_activities.workspace_id, dealers.workspace_id, dealership_designations.workspace_id, dealership_notes.workspace_id, dealership_rsm_assigns.workspace_id, dealership_users.workspace_id, dealership_users_invitations.workspace_id, dealerships.workspace_id, digital_assets.workspace_id, digital_assets_categories.workspace_id, digital_assets_downloads.workspace_id, digital_assets_tags.workspace_id, feedback.workspace_id, forms.workspace_id, group_network_dealership_users.workspace_id, group_network_dealerships.workspace_id, group_networks.workspace_id, guest_users.workspace_id, imaps.workspace_id, lead_activity_permissions.workspace_id, lead_assign_dealerships.workspace_id, lead_email_signature.workspace_id, lead_email_templates.workspace_id, lead_emails.workspace_id, lead_favourites.workspace_id, lead_products.workspace_id, lead_reads.workspace_id, lead_receive_emails.workspace_id, lead_rsm_assigns.workspace_id, lead_status.workspace_id, leads.workspace_id, lm_system_notifications.workspace_id, mautic_accounts.workspace_id, mautic_form_fields.workspace_id, mautic_forms.workspace_id, mautic_global_fields.workspace_id, module_workspaces.workspace_id, numverify.workspace_id, product_alias.workspace_id, product_images.workspace_id, product_variants.workspace_id, product_variants_types.workspace_id, products.workspace_id, roles.workspace_id, rsm_notes.workspace_id, share_assets_category.workspace_id, sharp_spring_accounts.workspace_id, sharp_spring_fields.workspace_id, sharp_spring_forms.workspace_id, sharp_spring_global_fields.workspace_id, sharp_spring_sync_leads_mappings.workspace_id, smtps.workspace_id, subscription_user_activities.workspace_id, subscription_users.workspace_id, twilio.workspace_id, user_invitations.workspace_id, workspace_brandings.workspace_id, workspace_leads_module_settings.workspace_id, workspace_mail_settings.workspace_id, workspace_sso_connections.workspace_id, workspace_users.workspace_id.
users ​
Admin-side user accounts (workspace members). Soft deleted.
Model: User · Created in 2014_10_12_000000_create_users_table.php · changed by 5 later migrations (latest update/2026_09_28_000003_add_provisioned_via_to_users_table.php) · soft deletes
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
title | varchar(255) | yes | ||
name | varchar(255) | yes | ||
email | varchar(255) | no | ||
password | varchar(255) | yes | ||
support_pin | varchar(255) | yes | ||
phone | varchar(255) | yes | ||
profile_image | varchar(255) | yes | ||
timezone | varchar(255) | no | UTC | |
is_active | tinyint | no | 0 | Comment: 0=Inactive, 1=Active |
is_verified | tinyint | no | 0 | Comment: 0=Not Verify, 1=Verify |
capacity_hour | double(10,2) | no | 0.0 | |
salary | double(10,2) | no | 0.0 | |
default_task | bigint unsigned | yes | ||
default_workspace | bigint unsigned | yes | ||
enable_notification | tinyint | no | 1 | Comment: 0=Disable, 1=Enable |
asana_id | bigint unsigned | yes | Comment: gid of asana | |
direct_follower_user | bigint unsigned | yes | 0 | |
allow_lead_import | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
delete_options | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
detail_view | enum(0,1) | no | 1 | Comment: 0 = Off, 1 = On |
last_login | timestamp | yes | ||
is_new_project | enum(0,1) | no | 0 | Comment: 1=Yes, 0=No |
remember_token | varchar(100) | yes | ||
general_invitation | tinyint | no | 0 | Comment: 0=No, 1=Yes |
deleted_at | timestamp | yes | soft delete | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
allow_dealership_import | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
allow_product_import | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
allow_deleting_leads | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
allow_deleting_dealerships | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
allow_deleting_products | enum(0,1) | no | 0 | Comment: 0 = false, 1 = true |
phone_line_type | varchar(255) | yes | ||
is_phone_number_validated | tinyint | no | 0 | |
phone_number_validation_data | json | yes | ||
is_user_logout | tinyint(1) | no | 0 | |
last_name | varchar(255) | yes | ||
provisioned_via | varchar(16) | yes | Comment: invite/self/social/sso_jit |
Indexes: users_email_unique unique (email).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
id | leads.rsm_user_id | Eloquent | - | Lead::users() (issue: key leads.rsm_user_id not in migrations) |
user_id | workspace_users.id | Eloquent | - | User::workspaceUserData() (issue: column users.user_id not in migrations) |
social_user_id | social_users.id | Eloquent | - | SocialUser::user() (issue: column users.social_user_id not in migrations) |
Referenced by: announcement_users.user_id, announcements.post_by, assets_versions.user_id, dam_acl.user_id, dam_asset_products.user_id, dam_collections.user_id, dam_system_notifications.sender_user_id, dam_tiles.user_id, dam_user_notifications.user_id, dealer_users.user_id, dealers.user_id, dealership_designations.created_by, dealership_designations.updated_by, dealership_notes.user_id, dealership_rsm_assigns.rsm_user_id, dealership_users.user_id, dealership_users_invitations.user_id, digital_assets.archive_by, digital_assets.user_id, digital_assets_categories.user_id, digital_assets_tags.user_id, feedback.user_id, general_invitations.user_id, general_invitations_workspaces.user_id, group_network_dealership_users.user_id, group_networks.created_by, jobs_history.user_id, lead_activity_permissions.user_id, lead_favourites.user_id, lead_notes.user_id, lead_reads.user_id, lead_rsm_assigns.rsm_user_id, lead_task_filter_histories.created_by, lead_tasks.user_id, leads.user_id, lm_system_notifications.sender_user_id, lm_system_notifications.user_id, password_verification_emails.user_id, permission_user.user_id, product_images.uploaded_by, product_variants_types.created_by, product_variants_types.updated_by, recent_searches.user_id, role_user.user_id, rsm_notes.rsm_user_id, rsm_notes.user_id, sharp_spring_fields.created_by, sharp_spring_fields.updated_by, sharp_spring_forms.created_by, sharp_spring_forms.updated_by, social_users.user_id, sso_identities.user_id, sso_login_events.user_id, subscription_user_activities.user_id, subscription_users.user_id, support_session_details.user_id, user_invitations.user_id, workspace_users.user_id, workspaces.created_by, workspaces.user_id.
workspace_users ​
Pivot: workspace membership of admin users, with per-workspace status.
Model: WorkspaceUser · Created in 2020_05_25_134827_create_workspace_users_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | FK → workspaces.id | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_status | tinyint | no | 1 | Comment: 1=Active , 0=Inactive |
capacity_hour | double(10,2) | no | 0.0 | |
salary | double(10,2) | no | 0.0 | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
id | workspaces.id | Eloquent | - | User::workspaceUserDetails() (issue: related pivot key is id instead of workspace_id) |
workspace_id | workspaces.id | FK | cascade | User::workspaceUser(), User::isAlreadyInWorkspace(), Workspace::usersDetails(), WorkspaceUser::workspaceDetails() |
user_id | users.id | FK | cascade | User::workspaceUser(), User::workspaceUserDetails(), User::isAlreadyInWorkspace(), Workspace::usersDetails() |
Referenced by: module_workspaces.workspace_id (not a key match).
roles ​
Roles per module and workspace (hierarchy, display_name).
Model: Role · Created in 2021_01_25_198444_create_roles_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
slug | varchar(255) | no | ||
display_name | varchar(255) | yes | ||
hierarchy | varchar(255) | yes | ||
module_id | bigint unsigned | yes | FK → modules.id | |
workspace_id | bigint unsigned | yes | FK → workspaces.id | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
module_id | modules.id | FK | cascade | - |
workspace_id | workspaces.id | FK | cascade | - |
Referenced by: dealership_users.role, dealership_users_invitations.role_id, role_user.role_id.
role_user ​
Pivot: role of a user in a workspace and module.
Model: RoleUser · Created in 2021_01_25_199222_create_role_user_table.php · changed by 1 later migration: 2026_08_17_100000
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
role_id | bigint unsigned | no | FK → roles.id | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | no | ||
module_id | bigint unsigned | yes | FK → modules.id | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: role_user_role_id_user_id_workspace_id_module_id_unique unique (role_id, user_id, workspace_id, module_id); role_user_user_ws_module_idx index (user_id, workspace_id, module_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
role_id | roles.id | FK | cascade | Role::users() |
user_id | users.id | FK | cascade | Role::users() |
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
module_id | modules.id | FK | cascade | - |
modules ​
Module catalogue (Projects, DAM, Lead Management).
Model: Modules · Created in 2021_01_25_185622_create_modules_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
slug | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Referenced by: dealership_users_invitations.module_id, device_token.module_id, module_workspaces.module_id, role_user.module_id, roles.module_id.
module_workspaces ​
Which modules are switched on for each workspace.
Model: ModuleWorkspace · Created in 2021_01_25_190141_create_module_workspaces_table.php · changed by 1 later migration: 2026_08_17_100000
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
module_id | bigint unsigned | no | FK → modules.id | |
workspace_id | bigint unsigned | no | ||
is_active | tinyint(1) | no | 1 | Comment: 0=Inactive, 1=Active |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: mw_ws_active_idx index (workspace_id, is_active).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
module_id | modules.id | FK | cascade | ModuleWorkspace::moduleData() (swapped keys) |
workspace_id | workspaces.id | Eloquent | - | Workspace::moduleDetails() |
workspace_id | workspace_users.workspace_id | Eloquent | - | WorkspaceUser::moduleData(), WorkspaceUser::email_modules() (matches on workspace_users.workspace_id, which is not a key) |
Referenced by: email_modules.module_id (not a key match).
permissions ​
Permission catalogue (name, slug).
Model: Permission · Created in 2020_05_25_125331_create_permissions_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
slug | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Referenced by: permission_user.permission_id.
permission_user ​
Pivot: permissions granted to a user, with workspace_id.
Model: none · Created in 2020_05_25_125536_create_permission_user_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
permission_id | bigint unsigned | no | FK → permissions.id | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: permission_user_permission_id_user_id_workspace_id_unique unique (permission_id, user_id, workspace_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
permission_id | permissions.id | FK | cascade | Permission::users() |
user_id | users.id | FK | cascade | Permission::users() |
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
user_invitations ​
Pending invitations of a user to a workspace (token).
Model: UserInvitation · Created in 2020_03_19_191105_create_user_invitations_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | no | FK → workspaces.id | |
token | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | UserInvitation::user() |
workspace_id | workspaces.id | FK | cascade | - |
general_invitations ​
Generic invitation links (token, email, revoke flag, expiry last_date).
Model: GeneralInvitations · Created in 2021_09_22_161134_create_general_invitations_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | yes | ||
token | varchar(255) | no | ||
email | varchar(255) | no | ||
name | varchar(255) | no | ||
is_revoked | enum(1,0) | no | 0 | Comment: 0 = No, 1 = Yes |
last_date | date | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | GeneralInvitations::user() |
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
general_invitations_workspaces ​
Workspaces attached to a general invitation.
Model: GeneralInvitationsWorkspace · Created in 2021_10_15_115858_create_general_invitations_workspaces_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
general_invitation_id | bigint unsigned | no | ||
workspace_id | bigint unsigned | no | ||
user_id | bigint unsigned | no | FK → users.id | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
general_invitation_id | not declared (name suggests general_invitations) | Column only | - | - |
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
user_id | users.id | FK | cascade | - |
social_users ​
Social login identities (service plus provider social_id) linked to a user.
Model: SocialUser · Created in 2020_03_17_103551_create_social_users_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
social_id | varchar(255) | yes | ||
service | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | User::social() |
password_verification_emails ​
Password set / verify tokens sent to users.
Model: PasswordVerificationEmail · Created in 2020_03_24_095155_create_password_verification_emails_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | ||
token | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | Eloquent | - | PasswordVerificationEmail::user() |
timezone_groups ​
Groups for the timezone picker.
Model: TimezoneGroup · Created in 2020_03_19_190555_create_timezone_groups_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
group_name | varchar(255) | no | ||
status | enum(0,1) | no | 1 | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Referenced by: timezones.timezone_group_id.
timezones ​
Timezone options, grouped by timezone_group_id.
Model: Timezone · Created in 2020_03_19_190608_create_timezones_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
timezone_group_id | bigint unsigned | no | FK → timezone_groups.id | |
timezone_value | varchar(255) | no | ||
timezone_label | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
timezone_group_id | timezone_groups.id | FK | cascade | TimezoneGroup::timeZone() |
admins ​
Back-office admin logins (name, email, password).
Model: Admin · Created in 2021_01_30_114032_create_admins_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
email | varchar(255) | no | ||
password | varchar(255) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
external_users ​
External (OTP login) users who can upload into a workspace. Soft deleted.
Model: ExternalUser · Created in update/2025_06_17_125413_create_external_users_table.php · soft deletes
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | ||
created_by | bigint unsigned | no | ||
name | varchar(255) | no | ||
email | varchar(255) | no | ||
otp | varchar(255) | yes | ||
otp_expires_at | timestamp | yes | ||
last_login | timestamp | yes | ||
is_active | tinyint | no | 1 | Comment: 0=Inactive, 1=Active |
deleted_at | timestamp | yes | soft delete | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
created_by | not declared | Column only | - | - |
Referenced by: digital_assets.user_id.
workspace_brandings ​
Branding (favicon, primary / secondary colour) per workspace and, since 2026-03, per portal (instance_id).
Model: WorkspaceBranding · Created in 2022_05_02_160522_create_workspace_brandings_table.php · changed by 1 later migration: 2026_03_16_175450
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | ||
is_branding | tinyint | no | 1 | |
brand_favicon | varchar(255) | yes | ||
primary_color | varchar(255) | no | #070E22 | |
secondary_color | varchar(255) | no | #ffffff | |
created_by | bigint unsigned | yes | ||
updated_by | bigint unsigned | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
instance_id | bigint unsigned | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | workspaces.id | Eloquent | - | Workspace::branding() (swapped keys) |
created_by | not declared | Column only | - | - |
updated_by | not declared | Column only | - | - |
instance_id | not declared (name suggests dam_instances) | Column only | - | - |
workspace_mail_settings ​
Per-workspace SMTP settings used for outgoing mail.
Model: WorkspaceMailSetting · Created in update/2026_05_21_130000_create_workspace_mail_settings_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | FK → workspaces.id | |
mail_host | varchar(255) | yes | ||
mail_port | varchar(255) | yes | ||
mail_username | varchar(255) | yes | ||
mail_password | text | yes | ||
mail_encryption | varchar(255) | yes | ||
mail_from_address | varchar(255) | yes | ||
mail_from_name | varchar(255) | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: workspace_mail_settings_workspace_id_unique unique (workspace_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | workspaces.id | FK | cascade | WorkspaceMailSetting::workspace(), Workspace::mailSetting() |
Authentication and SSO ​
The Passport tables come from the standard 2016 Passport migrations and have no foreign keys. oauth_access_tokens.user_id holds the id from whichever provider the client serves (users, dealer_users, dam_external_apps or external_users), so it cannot have one. Passport reads and writes these tables on the mysql_primary connection (config/passport.php).
Solid lines are foreign keys in the migrations; dotted lines are relations that exist only in the models. Tables from other pages appear without their own section here.
oauth_clients ​
Laravel Passport OAuth clients (provider names the user provider a client issues tokens for).
Model: none · Created in 2016_06_01_000004_create_oauth_clients_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | yes | ||
name | varchar(255) | no | ||
secret | varchar(100) | yes | ||
provider | varchar(255) | yes | ||
redirect | text | no | ||
personal_access_client | tinyint(1) | no | ||
password_client | tinyint(1) | no | ||
revoked | tinyint(1) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: oauth_clients_user_id_index index (user_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | not declared | Column only | - | - |
oauth_access_tokens ​
Laravel Passport access tokens for all four Passport guards (api, dam-api, external-api, external-user).
Model: none · Created in 2016_06_01_000002_create_oauth_access_tokens_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | varchar(100) | no | PK | |
user_id | bigint unsigned | yes | ||
client_id | bigint unsigned | no | ||
name | varchar(255) | yes | ||
scopes | text | yes | ||
revoked | tinyint(1) | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
expires_at | datetime | yes |
Indexes: oauth_access_tokens_user_id_index index (user_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | not declared | Column only | - | - |
client_id | not declared (name suggests oauth_clients) | Column only | - | - |
oauth_refresh_tokens ​
Laravel Passport refresh tokens.
Model: none · Created in 2016_06_01_000003_create_oauth_refresh_tokens_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | varchar(100) | no | PK | |
access_token_id | varchar(100) | no | ||
revoked | tinyint(1) | no | ||
expires_at | datetime | yes |
Indexes: oauth_refresh_tokens_access_token_id_index index (access_token_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
access_token_id | not declared (name suggests oauth_access_tokens) | Column only | - | - |
oauth_auth_codes ​
Laravel Passport authorization codes.
Model: none · Created in 2016_06_01_000001_create_oauth_auth_codes_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | varchar(100) | no | PK | |
user_id | bigint unsigned | no | ||
client_id | bigint unsigned | no | ||
scopes | text | yes | ||
revoked | tinyint(1) | no | ||
expires_at | datetime | yes |
Indexes: oauth_auth_codes_user_id_index index (user_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | not declared | Column only | - | - |
client_id | not declared (name suggests oauth_clients) | Column only | - | - |
oauth_personal_access_clients ​
Laravel Passport personal access clients.
Model: none · Created in 2016_06_01_000005_create_oauth_personal_access_clients_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
client_id | bigint unsigned | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
client_id | not declared (name suggests oauth_clients) | Column only | - | - |
webauthn_credentials ​
Passkeys (WebAuthn credentials). Created by the laragear/webauthn package migration.
Model: none · Created in update/2026_07_09_120000_create_webauthn_credentials_table.php
The migration file only returns WebAuthnCredential::migration() from laragear/webauthn. The package is not in this repository snapshot (no vendor/), so its columns are not listed here. The model side is User with the WebAuthnAuthentication trait (a morph relation from the package).
workspace_sso_connections ​
Enterprise SAML SSO connection per workspace (IdP metadata, certificate, allowed domains, sync state).
Model: WorkspaceSsoConnection · Created in update/2026_09_28_000000_create_workspace_sso_connections_table.php · changed by 1 later migration: 2026_09_29_000000
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | FK → workspaces.id | |
provider | varchar(32) | no | microsoft | Comment: microsoft/google/okta/other |
metadata_url | varchar(2048) | yes | ||
idp_entity_id | varchar(1024) | yes | ||
idp_sso_url | varchar(2048) | yes | ||
idp_certificate | text | yes | Comment: PEM body; JSON array when the IdP publishes several signing certs | |
certificate_expires_at | datetime | yes | ||
allowed_domains | json | yes | A mirror of the names in workspace_sso_domains, kept by refreshDomainMirror() for older readers; sign-in matching reads the table | |
email_attribute | varchar(255) | yes | Comment: SAML attribute holding the email; null = provider default / NameID | |
stable_id_attribute | varchar(255) | yes | Comment: SAML attribute holding the IdP user id; null = provider default / NameID | |
default_role_slug | varchar(32) | no | viewer | |
show_on_custom_domain | tinyint(1) | no | 0 | |
enabled | tinyint(1) | no | 0 | |
last_synced_at | timestamp | yes | ||
last_sync_status | varchar(16) | no | never | Comment: never/queued/running/ok/failed |
last_sync_message | text | yes | ||
created_by | bigint unsigned | yes | ||
updated_by | bigint unsigned | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
metadata_xml | mediumtext | yes | ||
metadata_file_name | varchar(255) | yes | ||
metadata_uploaded_at | datetime | yes |
Indexes: uq_sso_conn_workspace unique (workspace_id).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | workspaces.id | FK | cascade | WorkspaceSsoConnection::workspace(), Workspace::ssoConnection() |
created_by | not declared | Column only | - | - |
updated_by | not declared | Column only | - | - |
Referenced by: sso_identities.workspace_sso_connection_id, sso_login_events.workspace_sso_connection_id, workspace_sso_domains.workspace_sso_connection_id.
workspace_sso_domains ​
One allowed email domain of an SSO connection, with proof of ownership. Only rows with status = verified take part in sign-in matching. See SSO domain verification.
Model: WorkspaceSsoDomain · Created in update/2026_11_04_000000_create_workspace_sso_domains_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_sso_connection_id | bigint unsigned | no | FK → workspace_sso_connections.id | |
domain | varchar(255) | no | Lowercase, no leading @ | |
verification_token | varchar(64) | no | 40 hex characters; the TXT value is collage-verify=<token> | |
status | varchar(16) | no | pending | pending, verified or failed |
verified_by | varchar(16) | yes | dns or support | |
verified_by_user_id | bigint unsigned | yes | Owner who ran the DNS check; null for support | |
verified_at | timestamp | yes | ||
last_checked_at | timestamp | yes | ||
last_error | varchar(512) | yes | Last failed lookup message | |
created_by | bigint unsigned | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: uq_sso_domain_conn_domain unique (workspace_sso_connection_id, domain); idx_sso_domain_domain_status index (domain, status). The same domain may be verified by several workspaces (each with its own token), so domain alone is not unique.
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_sso_connection_id | workspace_sso_connections.id | FK fk_sso_domain_connection | cascade | WorkspaceSsoDomain::connection(), WorkspaceSsoConnection::domains() |
verified_by_user_id | not declared | Column only | - | - |
created_by | not declared | Column only | - | - |
Data migration. up() copies every name in each connection's allowed_domains JSON into this table as pending with a new token (skipping duplicates). Those domains stop matching sign-ins until they are verified.
sso_identities ​
Link between a user and an SSO connection (name_id, login and recheck times).
Model: SsoIdentity · Created in update/2026_09_28_000001_create_sso_identities_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_sso_connection_id | bigint unsigned | no | FK → workspace_sso_connections.id | |
name_id | varchar(255) | no | ||
email_at_idp | varchar(255) | yes | ||
first_login_at | timestamp | yes | ||
last_login_at | timestamp | yes | ||
last_verified_at | timestamp | yes | ||
last_recheck_failed_at | timestamp | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: uq_sso_identity_conn_nameid unique (workspace_sso_connection_id, name_id); uq_sso_identity_user_conn unique (user_id, workspace_sso_connection_id); idx_sso_identity_conn_last_login index (workspace_sso_connection_id, last_login_at).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | User::ssoIdentities(), SsoIdentity::user() |
workspace_sso_connection_id | workspace_sso_connections.id | FK | cascade | SsoIdentity::connection(), WorkspaceSsoConnection::identities() |
sso_login_events ​
Audit log of SSO sign-in attempts and metadata syncs (outcome, reason, ip).
Model: SsoLoginEvent · Created in update/2026_09_28_000002_create_sso_login_events_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | yes | ||
workspace_sso_connection_id | bigint unsigned | yes | ||
user_id | bigint unsigned | yes | ||
email | varchar(255) | yes | ||
outcome | varchar(16) | no | Comment: ok/blocked/system | |
reason | varchar(64) | yes | ||
detail | varchar(1024) | yes | ||
ip | varchar(64) | yes | ||
user_agent | varchar(512) | yes | ||
created_at | timestamp | no | CURRENT_TIMESTAMP |
Indexes: idx_sso_events_ws_created index (workspace_id, created_at); idx_sso_events_user_created index (user_id, created_at).
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
workspace_sso_connection_id | workspace_sso_connections.id | Eloquent | - | WorkspaceSsoConnection::events() |
user_id | users.id | Eloquent | - | SsoLoginEvent::user() |
support_session_details ​
Support "log in as" sessions (support_token, system_data).
Model: SupportSessionDetails · Created in 2021_10_23_105724_create_support_session_details_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
system_data | text | yes | ||
is_active | enum(0,1) | no | 1 | Comment: 0 = In Active, 1 = Active |
support_token | varchar(255) | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | User::supportSessionData() |
Subscription and billing ​
The subscription models live in app/Models/DAM but are workspace billing, so they are documented here. coupon_id on subscription_users and dam_inquiry was a foreign key to coupons until 2022, when it was dropped and the column became a string.
Solid lines are foreign keys in the migrations; dotted lines are relations that exist only in the models. Tables from other pages appear without their own section here.
subscriptions ​
Subscription plans (Stripe reference, billing cycle, price, features).
Model: DAM\Subscriptions · Created in 2022_06_07_111317_create_subscriptions_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
slug | varchar(255) | no | ||
stripe_reference_id | varchar(255) | yes | ||
group_name | varchar(255) | no | ||
type | enum(custom,default) | no | default | Comment: custom,default |
billing_cycle | enum(monthly,yearly) | no | monthly | Comment: monthly, yearly |
price | double(8,2) unsigned | yes | ||
features | text | yes | ||
is_active | tinyint(1) | no | 0 | Comment: 1=Active, 0=InActive |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: subscriptions_slug_unique unique (slug); subscriptions_stripe_reference_id_unique unique (stripe_reference_id).
Referenced by: dam_inquiry.subscription_id, subscription_users.subscription_id.
subscription_users ​
A workspace's subscription: plan, Stripe customer/subscription ids, payment, trial and suspension state.
Model: DAM\SubscriptionUsers · Created in 2022_06_07_121534_create_subscription_users_table.php · changed by 10 later migrations (latest update/2023_09_22_185421_add_email_send_number_to_subscription_users_table.php)
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | yes | FK → workspaces.id | |
subscription_id | bigint unsigned | yes | FK → subscriptions.id | |
stripe_customer_id | varchar(255) | yes | ||
stripe_payment_id | varchar(255) | yes | ||
stripe_subscription_id | varchar(255) | yes | ||
features | text | yes | ||
coupon_id | varchar(255) | no | redefined with ->change() in 2022_09_22_193524… | |
billing_cycle | varchar(255) | yes | Comment: monthly, yearly | |
price | double(8,2) | yes | ||
discount | double(8,2) | yes | ||
pay_amount | double(8,2) | yes | ||
payment_type | enum(cheque,card,cash,bank_transfer,other) | no | card | Comment: cheque,card,cash,bank_transfer,other |
payment_status | enum(pending,success,fail,cancel) | no | pending | Comment: pending,success,fail,cancel |
payment_status_alias | varchar(255) | yes | ||
is_active | tinyint(1) | no | 0 | Comment: 1=Active, 0=InActive |
is_existing_user | tinyint(1) | yes | ||
start_date | datetime | yes | ||
cancel_reason | varchar(255) | yes | ||
cancel_comment | longtext | yes | ||
status | enum(active,inactive,cancel) | no | inactive | Comment: active |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
next_billing_date | date | yes | ||
next_subscription_id | bigint unsigned | yes | ||
event_sent | tinyint(1) | no | false | |
dashboard_walkthrough | tinyint(1) | no | true | |
is_backoffice_user | tinyint(1) | no | 0 | Comment: 1=Yes, 0=No |
payment_link | varchar(255) | yes | ||
payment_pause | tinyint(1) | yes | 0 | |
trial_days | tinyint(1) | no | 0 | |
trial_end_date | datetime | yes | ||
is_trial_account | tinyint(1) | no | 0 | Comment: 1=trial_account , 0=normal_plan |
trial_expire | enum(true,false) | no | false | |
is_suspended | tinyint(1) | no | 0 | |
delete_all_data | tinyint(1) | no | 0 | |
openai_image_count | bigint unsigned | no | 0 | |
is_payment_done | tinyint(1) | no | 0 | |
email_send_number | int | yes | ||
email_flag | varchar(255) | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | SubscriptionUsers::users() |
workspace_id | workspaces.id | FK | cascade | - |
subscription_id | subscriptions.id | FK | cascade | SubscriptionUsers::subscription(), Subscriptions::subscriptionUsers() |
stripe_customer_id | dam_inquiry.stripe_customer_id | Eloquent | - | SubscriptionUsers::inquiry() (matches on dam_inquiry.stripe_customer_id, which is not a key) |
coupon_id | not declared | Column only | - | - |
next_subscription_id | not declared (name suggests subscriptions) | Column only | - | - |
Referenced by: assets_versions.workspace_id (not a key match), subscription_user_addons.subscription_user_id.
subscription_addons ​
Purchasable add-ons (Stripe reference, price, tokens).
Model: DAM\SubscriptionAddon · Created in 2023_02_28_114627_create_subscription_addons_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
slug | varchar(255) | no | ||
stripe_reference_id | varchar(255) | yes | ||
group_name | varchar(255) | no | ||
billing_cycle | enum(monthly,yearly) | no | monthly | Comment: monthly, yearly |
price | double(8,2) | yes | ||
tokens | varchar(255) | no | ||
is_active | tinyint(1) | no | 0 | Comment: 1=Active, 0=InActive |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
Indexes: subscription_addons_slug_unique unique (slug); subscription_addons_stripe_reference_id_unique unique (stripe_reference_id).
Referenced by: subscription_user_addons.subscription_addon_id.
subscription_user_addons ​
Add-ons bought by a subscription user.
Model: DAM\SubscriptionUserAddon · Created in 2023_02_28_114734_create_subscription_user_addons_table.php · changed by 1 later migration: 2023_03_03_180555 · soft deletes
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
subscription_addon_id | bigint unsigned | no | FK → subscription_addons.id | |
subscription_user_id | bigint unsigned | no | FK → subscription_users.id | |
is_deleted | tinyint(1) | no | 0 | Comment: 0 = Not Delete, 1 = Delete |
deleted_at | timestamp | yes | soft delete | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
stripe_customer_id | varchar(255) | yes | ||
stripe_payment_id | varchar(255) | yes | ||
stripe_subscription_id | varchar(255) | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
subscription_addon_id | subscription_addons.id | FK | cascade | SubscriptionUserAddon::subscription_addon() |
subscription_user_id | subscription_users.id | FK | cascade | - |
subscription_user_activities ​
Log of actions on a subscription (log_details, activity_performed_by).
Model: DAM\SubscriptionUserActivity · Created in 2022_09_23_154955_create_subscription_user_activities_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | yes | FK → workspaces.id | |
user_id | bigint unsigned | no | FK → users.id | |
log_details | longtext | yes | ||
activity_performed_by | tinyint(1) | yes | Comment: 1=Admin, 0=user | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | workspaces.id | FK | cascade | - |
user_id | users.id | FK | cascade | SubscriptionUserActivity::users() |
coupons ​
Discount coupons (type, value, plans, expiry, redemptions).
Model: DAM\Coupons · Created in 2022_06_07_112007_create_coupons_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
name | varchar(255) | no | ||
code | varchar(255) | no | ||
type | varchar(255) | no | Comment: Percentage,Fixed | |
value | varchar(255) | no | ||
plans | text | yes | ||
expiration_date | date | yes | ||
total_redeemed | int | yes | ||
is_active | tinyint(1) | no | 0 | Comment: 1=Active, 0=InActive |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
dam_inquiry ​
Plan purchase inquiries and their payment state (Stripe ids, amounts).
Model: DAM\DamInquiry · Created in 2022_06_07_112408_create_dam_inquiry_table.php · changed by 1 later migration: 2022_09_26_160604
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
subscription_id | bigint unsigned | no | FK → subscriptions.id | |
stripe_customer_id | varchar(255) | yes | ||
stripe_payment_id | varchar(255) | yes | ||
stripe_subscription_id | varchar(255) | yes | ||
coupon_id | varchar(255) | no | redefined with ->change() in 2022_09_26_160604… | |
name | varchar(255) | yes | ||
email | varchar(255) | yes | ||
company_name | varchar(255) | yes | ||
phone | varchar(255) | yes | ||
price | double(8,2) unsigned | no | ||
discount | double(8,2) unsigned | no | ||
pay_amount | double(8,2) unsigned | no | ||
payment_type | enum(cheque,card,bank_transfer) | no | card | Comment: cheque,card,bank_transfer |
payment_status | enum(pending,success,fail,cancel) | no | pending | Comment: pending,success,fail,cancel |
payment_status_alias | varchar(255) | yes | ||
is_active | tinyint(1) | no | 0 | Comment: 1=Active, 0=InActive |
quick_note | longtext | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
subscription_id | subscriptions.id | FK | cascade | DamInquiry::subscription() |
coupon_id | not declared | Column only | - | - |
Referenced by: subscription_users.stripe_customer_id (not a key match).
Notifications, announcements and logs ​
Solid lines are foreign keys in the migrations; dotted lines are relations that exist only in the models. Tables from other pages appear without their own section here.
announcements ​
Announcements posted to a workspace audience, optionally scheduled or drafted.
Model: Announcements · Created in 2021_09_11_135714_create_announcements_table.php · changed by 3 later migrations: 2022_05_20_122442, 2023_10_23_155559, 2026_11_16_000001 (adds published_at)
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
post_by | bigint unsigned | no | FK → users.id | |
workspace_id | bigint unsigned | no | FK → workspaces.id | |
title | varchar(255) | no | ||
description | longtext | no | ||
publish_date | date | yes | Calendar day only | |
published_at | datetime | yes | Instant the post went live (app time zone). Backfill for already-published rows: created_at when publish_date is null or on/before the creation day, else publish_date at 13:30:00 (the cron time) | |
user_type | varchar(255) | no | ||
is_scheduled | enum(0,1) | no | 0 | Comment: 0 = No, 1= Yes |
is_draft | enum(0,1) | no | 0 | Comment: 0 = No, 1= Yes |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
module_id | bigint unsigned | yes | ||
group_ids | varchar(255) | yes | `` |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
post_by | users.id | FK | cascade | Announcements::publisher() (swapped keys) |
workspace_id | workspaces.id | FK | cascade | Announcements::workspaces() (swapped keys) |
module_id | not declared (name suggests modules) | Column only | - | - |
Referenced by: announcement_systm_notifications.announcement_id, announcement_users.announcement_id.
announcement_users ​
Recipients of an announcement.
Model: AnnouncementUsers · Created in 2021_09_11_135917_create_announcement_users_table.php · changed by 1 later migration: 2022_05_20_124420
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
announcement_id | bigint unsigned | no | FK → announcements.id | |
user_id | bigint unsigned | no | ||
workspace_id | bigint unsigned | no | FK → workspaces.id | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
user_type | varchar(255) | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
announcement_id | announcements.id | FK | cascade | Announcements::usersDetails(), Announcements::announcementUsers() |
user_id | users.id | Eloquent | - | Announcements::usersDetails() |
workspace_id | workspaces.id | FK | cascade | - |
announcement_systm_notifications ​
In-app notification rows for announcements, with read_at.
Model: AnnouncementSystmNotifications · Created in 2021_09_11_140506_create_announcement_systm_notifications_table.php · changed by 1 later migration: 2022_05_20_124127
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
announcement_id | bigint unsigned | no | FK → announcements.id | |
user_id | bigint unsigned | no | ||
workspace_id | bigint unsigned | no | FK → workspaces.id | |
read_at | datetime | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
user_type | varchar(255) | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
announcement_id | announcements.id | FK | cascade | AnnouncementSystmNotifications::announcementsDetail() (swapped keys) |
user_id | not declared | Column only | - | - |
workspace_id | workspaces.id | FK | cascade | AnnouncementSystmNotifications::workspaceDetail() (swapped keys) |
email_modules ​
Catalogue of email notification types per module.
Model: EmailControl\EmailModule · Created in 2021_08_19_155905_email_module.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
module_id | bigint unsigned | no | ||
email_module_name | varchar(255) | no | ||
name_slug | varchar(255) | no | ||
type | varchar(255) | no | ||
default | int | no | 0 | |
is_access | int | no | 0 | |
is_cron | int | no | 0 | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
module_id | module_workspaces.module_id | Eloquent | - | ModuleWorkspace::email_modules() (matches on module_workspaces.module_id, which is not a key) |
Referenced by: email_control_role_wise.email_module_id, email_control_user_wise.email_module_id.
email_control_role_wise ​
Email notification switches per role (and optionally dealership).
Model: EmailControl\EmailControlRoleWise · Created in 2021_08_19_154211_email_control_role_wise.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | ||
email_module_id | bigint unsigned | no | ||
role_id | bigint unsigned | no | ||
created_by | bigint unsigned | no | ||
updated_by | bigint unsigned | no | ||
dealership_id | bigint unsigned | yes | ||
status | int | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
email_module_id | email_modules.id | Eloquent | - | EmailModule::checkRoleStatus() |
role_id | not declared (name suggests roles) | Column only | - | - |
created_by | not declared | Column only | - | - |
updated_by | not declared | Column only | - | - |
dealership_id | not declared (name suggests dealerships) | Column only | - | - |
email_control_user_wise ​
Email notification switches per user (and optionally lead).
Model: EmailControl\EmailControlUserWise · Created in 2021_08_19_155337_email_control_user_wise.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
workspace_id | bigint unsigned | no | ||
email_module_id | bigint unsigned | yes | ||
lead_id | bigint unsigned | yes | ||
user_id | bigint unsigned | yes | ||
notification_type | varchar(255) | yes | ||
status | int | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
email_module_id | email_modules.id | Eloquent | - | EmailModule::checkUserStatus(), EmailModule::checkNotificationStatus() |
lead_id | not declared (name suggests leads) | Column only | - | - |
user_id | not declared | Column only | - | - |
device_token ​
FCM push tokens per user and module.
Model: DeviceToken · Created in 2021_12_15_155737_create_device_token_table.php · changed by 1 later migration: 2023_05_02_151049
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | yes | FK → dealer_users.id | |
fcm_token | text | yes | ||
module_id | bigint unsigned | yes | FK → modules.id | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | dealer_users.id | FK | cascade | - |
module_id | modules.id | FK | cascade | - |
mute_notifications ​
Per-user, per-workspace, per-module notification mute switch.
Model: MuteNotifications · Created in 2021_12_17_165044_create_mute_notifications_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | ||
workspace_id | bigint unsigned | no | ||
module_id | bigint unsigned | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | not declared | Column only | - | - |
workspace_id | not declared (name suggests workspaces) | Column only | - | - |
module_id | not declared (name suggests modules) | Column only | - | - |
user_notification_badges ​
Unread badge counters per user (announcements, LM, DAM, orders).
Model: Project\ProjectUserNotificationBadges · Created in 2021_09_06_190843_create_project_user_notification_badges_table.php · changed by 2 later migrations: 2022_05_20_123359, 2022_12_05_170532
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | ||
badges_count | varchar(255) | no | 0 | |
announcement_badges_count | varchar(255) | no | 0 | |
lm_badges_count | varchar(255) | no | 0 | |
dam_badges_count | varchar(255) | no | 0 | |
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
dam_announcement_badges_count | varchar(255) | no | 0 | |
user_type | varchar(255) | yes | ||
lm_announcement_badges_count | varchar(255) | no | 0 | |
dam_badges_count_order | varchar(255) | no | 0 |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | not declared | Column only | - | - |
feedback ​
In-app feedback messages from users.
Model: feedback · Created in 2022_06_14_114806_create_feedback_table.php · changed by 1 later migration: 2022_06_29_131931
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | char(36) | no | PK | |
user_id | bigint unsigned | no | FK → users.id | |
user_name | varchar(255) | no | ||
user_email | varchar(255) | no | ||
workspace_id | bigint unsigned | no | FK → workspaces.id | |
workspace_name | varchar(255) | no | ||
comment | longtext | no | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes | ||
module_id | smallint | no |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | - |
workspace_id | workspaces.id | FK | cascade | - |
module_id | not declared (name suggests modules) | Column only | - | - |
jobs_history ​
Per-user record of background job batches (total_job, data).
Model: JobsHistory · Created in 2020_09_18_191635_create_jobs_history_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
user_id | bigint unsigned | no | FK → users.id | |
total_job | bigint | no | ||
data | text | yes |
| Column | References | Type | On delete | Model relation |
|---|---|---|---|---|
user_id | users.id | FK | cascade | - |
mobile_versions ​
Current Android / iOS app versions per module.
Model: MobileVersions · Created in 2021_07_22_172822_create_mobile_versions.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
module | varchar(255) | yes | Comment: PM,DAM,LM | |
android | varchar(255) | yes | ||
ios | varchar(255) | yes | ||
created_at | timestamp | yes | ||
updated_at | timestamp | yes |
email_log ​
Copy of every outgoing email (date, addresses, subject, body, headers, attachments).
Model: none · Created in 2015_07_31_1_email_log.php · changed by 3 later migrations: 2016_09_21_001638, 2017_11_10_001638, 2018_05_11_115355
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | int unsigned | no | PK, auto increment | |
date | datetime | no | ||
from | varchar(255) | yes | ||
to | varchar(255) | yes | redefined with ->change() in 2016_09_21_001638… | |
cc | varchar(255) | yes | ||
bcc | varchar(255) | yes | ||
subject | varchar(255) | no | ||
body | text | no | ||
headers | text | yes | ||
attachments | longtext | yes | redefined with ->change() in 2018_05_11_115355… |
Queue tables ​
Both tables are used through the mysql_queue connection (see Connections). There are no sessions, cache, password_resets or personal_access_tokens tables in the migrations; see Framework tables.
jobs ​
Database queue (database and database_migration queue connections, mysql_queue DB connection).
Model: none · Created in 2020_05_06_114814_create_jobs_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
queue | varchar(255) | no | ||
payload | longtext | no | ||
attempts | tinyint unsigned | no | ||
reserved_at | int unsigned | yes | ||
available_at | int unsigned | no | ||
created_at | int unsigned | no |
Indexes: jobs_queue_index index (queue).
failed_jobs ​
Failed queue jobs (database-uuids failed driver on the mysql_queue connection).
Model: none · Created in 2019_08_19_000000_create_failed_jobs_table.php
| Column | Type | Null | Default | Notes |
|---|---|---|---|---|
id | bigint unsigned | no | PK, auto increment | |
uuid | varchar(255) | no | ||
connection | text | no | ||
queue | text | no | ||
payload | longtext | no | ||
exception | longtext | no | ||
failed_at | timestamp | no | CURRENT_TIMESTAMP |
Indexes: failed_jobs_uuid_unique unique (uuid).
Related ​
- Database overview · All relationships
- Models: DAM models · Core models · LM models