openvk/install/sqls/00038-logs.sql

22 lines
852 B
MySQL
Raw Normal View History

2023-08-02 16:56:07 +03:00
CREATE TABLE `logs`
(
`id` bigint(20) UNSIGNED NOT NULL,
`user` bigint(20) UNSIGNED NOT NULL,
`type` int(11) NOT NULL,
`object_table` tinytext COLLATE utf8mb4_unicode_ci NOT NULL,
`object_model` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL,
`object_id` bigint(20) UNSIGNED NOT NULL,
`xdiff_old` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`xdiff_new` longtext COLLATE utf8mb4_unicode_ci NOT NULL,
`ts` bigint(20) NOT NULL,
`ip` tinytext NOT NULL,
`useragent` longtext NOT NULL
2023-08-02 16:56:07 +03:00
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
ALTER TABLE `logs`
ADD PRIMARY KEY (`id`);
ALTER TABLE `logs`
MODIFY `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT;
COMMIT;