CREATE TABLE `id_list` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `type` enum('post','event','profile','library','share') COLLATE utf8_bin NOT NULL, PRIMARY KEY (`id`) ) ENGINE=ndbcluster AUTO_INCREMENT=5081 DEFAULT CHARSET=utf8 COLLATE=utf8_bin; CREATE TABLE `library` ( `id` bigint(20) unsigned NOT NULL DEFAULT '1', `id_author` bigint(20) unsigned NOT NULL, KEY `id` (`id`), KEY `id_author` (`id_author`), CONSTRAINT `library_ibfk_1` FOREIGN KEY(`id`) REFERENCES `id_list` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT, CONSTRAINT `library_ibfk_2` FOREIGN KEY(`id_author`) REFERENCES `id_list` (`id`) ON DELETE CASCADE ON UPDATE RESTRICT ) ENGINE=ndbcluster DEFAULT CHARSET=utf8 COLLATE=utf8_bin; CREATE TABLE `library_settings` ( `id_library` bigint(20) unsigned NOT NULL, UNIQUE KEY `id_library` (`id_library`) ) ENGINE=ndbcluster DEFAULT CHARSET=utf8 COLLATE=utf8_bin;