ENH - expand phone app experience

This commit is contained in:
smx.pusha
2026-08-11 12:51:59 +02:00
parent ab7c38b682
commit 67edb404c6
18 changed files with 4548 additions and 350 deletions
+6
View File
@@ -354,7 +354,11 @@ local schema = {
{ name = "account_id", type = "BIGINT UNSIGNED NULL" },
{ name = "device_imei", type = "CHAR(15) NULL", characterSet = "ascii", collation = "ascii_bin" },
{ name = "name", type = "VARCHAR(80) NOT NULL" },
{ name = "notes", type = "VARCHAR(500) NULL" },
{ name = "organization", type = "VARCHAR(80) NULL" },
{ name = "phone_number", type = "VARCHAR(24) NOT NULL", characterSet = "ascii", collation = "ascii_bin" },
{ name = "avatar_media_id", type = "BIGINT UNSIGNED NULL" },
{ name = "favorite", type = "TINYINT(1) NOT NULL DEFAULT 0" },
{ name = "created_at", type = "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP" },
{ name = "updated_at", type = "DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP" },
},
@@ -362,10 +366,12 @@ local schema = {
indexes = {
{ name = "idx_sky_phone_contacts_account", columns = "(`account_id`, `name`)" },
{ name = "idx_sky_phone_contacts_device", columns = "(`device_imei`, `name`)" },
{ name = "idx_sky_phone_contacts_avatar", columns = "(`avatar_media_id`)" },
},
foreignKeys = {
{ column = "account_id", references = "`sky_phone_accounts` (`id`) ON DELETE CASCADE" },
{ column = "device_imei", references = "`sky_phone_devices` (`imei`) ON DELETE CASCADE" },
{ column = "avatar_media_id", references = "`sky_phone_media` (`id`) ON DELETE SET NULL" },
},
tableOptions = "ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci",
},