mirror of
https://github.com/openvk/openvk
synced 2025-04-24 00:53:00 +03:00
Add playlists sql
This commit is contained in:
parent
3e119ccbc6
commit
c209b6f98b
1 changed files with 34 additions and 0 deletions
|
@ -53,3 +53,37 @@ CREATE TABLE IF NOT EXISTS `audio_relations` (
|
||||||
KEY `user` (`entity`) USING BTREE,
|
KEY `user` (`entity`) USING BTREE,
|
||||||
KEY `entity_audio` (`entity`,`audio`)
|
KEY `entity_audio` (`entity`,`audio`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `playlists` (
|
||||||
|
`id` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
`owner` bigint NOT NULL,
|
||||||
|
`name` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci NOT NULL,
|
||||||
|
`description` varchar(2048) DEFAULT NULL,
|
||||||
|
`length` int unsigned NOT NULL DEFAULT '0',
|
||||||
|
`special_type` tinyint unsigned NOT NULL DEFAULT '0',
|
||||||
|
`created` bigint unsigned DEFAULT NULL,
|
||||||
|
`edited` bigint unsigned DEFAULT NULL,
|
||||||
|
`deleted` tinyint unsigned DEFAULT '0',
|
||||||
|
PRIMARY KEY (`id`),
|
||||||
|
KEY `owner_deleted` (`owner`,`deleted`),
|
||||||
|
FULLTEXT KEY `title_description` (`name`,`description`),
|
||||||
|
FULLTEXT KEY `title` (`name`)
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `playlist_imports` (
|
||||||
|
`entity` bigint NOT NULL,
|
||||||
|
`playlist` bigint unsigned NOT NULL,
|
||||||
|
`index` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`index`) USING BTREE,
|
||||||
|
KEY `user` (`entity`) USING BTREE,
|
||||||
|
KEY `entity_audio` (`entity`,`playlist`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
|
|
||||||
|
CREATE TABLE IF NOT EXISTS `playlist_relations` (
|
||||||
|
`collection` bigint unsigned NOT NULL,
|
||||||
|
`media` bigint unsigned NOT NULL,
|
||||||
|
`index` bigint unsigned NOT NULL AUTO_INCREMENT,
|
||||||
|
PRIMARY KEY (`index`) USING BTREE,
|
||||||
|
KEY `playlist` (`collection`) USING BTREE,
|
||||||
|
KEY `audio` (`media`) USING BTREE
|
||||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_520_ci;
|
||||||
|
|
Loading…
Reference in a new issue