⚝
One Hat Cyber Team
⚝
Your IP:
18.222.226.47
Server IP:
162.254.39.145
Server:
Linux premium289.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64
Server Software:
LiteSpeed
PHP Version:
8.2.28
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
proc
/
thread-self
/
root
/
var
/
softaculous
/
eventsch
/
View File Name :
eventsch.sql
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO"; SET time_zone = "+00:00"; /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; /*!40101 SET NAMES utf8 */; -- -- Database: `eventsch1022` -- -- -------------------------------------------------------- -- -- Table structure for table `cache` -- CREATE TABLE `cache` ( `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `value` mediumtext COLLATE utf8mb4_unicode_ci NOT NULL, `expiration` int(11) NOT NULL, PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `cache_locks` -- CREATE TABLE `cache_locks` ( `key` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `owner` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `expiration` int(11) NOT NULL, PRIMARY KEY (`key`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `events` -- CREATE TABLE `events` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned NOT NULL, `venue_id` bigint(20) unsigned DEFAULT NULL, `published_at` datetime DEFAULT NULL, `is_accepted` tinyint(1) DEFAULT NULL, `starts_at` datetime DEFAULT NULL, `duration` float DEFAULT NULL, `description` text COLLATE utf8mb4_unicode_ci, `description_html` text COLLATE utf8mb4_unicode_ci, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `days_of_week` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `event_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `flyer_image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `curator_id` bigint(20) unsigned DEFAULT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `event_password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `tickets_enabled` tinyint(1) NOT NULL DEFAULT '0', `ticket_currency_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'USD', `ticket_notes` text COLLATE utf8mb4_unicode_ci, `payment_method` enum('cash','stripe','invoiceninja') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cash', `payment_instructions` text COLLATE utf8mb4_unicode_ci, `payment_instructions_html` text COLLATE utf8mb4_unicode_ci, `expire_unpaid_tickets` int(11) NOT NULL DEFAULT '0', `ticket_notes_html` text COLLATE utf8mb4_unicode_ci, `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `registration_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_en` text COLLATE utf8mb4_unicode_ci, `description_html_en` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `events_user_id_foreign` (`user_id`), KEY `events_venue_id_foreign` (`venue_id`), KEY `events_curator_id_foreign` (`curator_id`), KEY `events_slug_index` (`slug`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `event_role` -- CREATE TABLE `event_role` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `role_id` bigint(20) unsigned NOT NULL, `is_accepted` tinyint(1) DEFAULT NULL, `name_translated` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_translated` text COLLATE utf8mb4_unicode_ci, `description_html_translated` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`), UNIQUE KEY `event_role_role_id_event_id_unique` (`role_id`,`event_id`), KEY `event_role_event_id_foreign` (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `failed_jobs` -- CREATE TABLE `failed_jobs` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `uuid` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `connection` text COLLATE utf8mb4_unicode_ci NOT NULL, `queue` text COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `exception` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `failed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `failed_jobs_uuid_unique` (`uuid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `jobs` -- CREATE TABLE `jobs` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `queue` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `attempts` tinyint(3) unsigned NOT NULL, `reserved_at` int(10) unsigned DEFAULT NULL, `available_at` int(10) unsigned NOT NULL, `created_at` int(10) unsigned NOT NULL, PRIMARY KEY (`id`), KEY `jobs_queue_index` (`queue`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `job_batches` -- CREATE TABLE `job_batches` ( `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `total_jobs` int(11) NOT NULL, `pending_jobs` int(11) NOT NULL, `failed_jobs` int(11) NOT NULL, `failed_job_ids` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `options` mediumtext COLLATE utf8mb4_unicode_ci, `cancelled_at` int(11) DEFAULT NULL, `created_at` int(11) NOT NULL, `finished_at` int(11) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `migrations` -- CREATE TABLE `migrations` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `migration` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `batch` int(11) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=25 ; -- -- Dumping data for table `migrations` -- INSERT INTO `migrations` VALUES (1, '0001_01_01_000000_create_users_table', 1), (2, '0001_01_01_000001_create_cache_table', 1), (3, '0001_01_01_000002_create_jobs_table', 1), (4, '2024_07_13_184927_setup_database', 1), (5, '2024_08_18_154754_add_schedule_column', 1), (6, '2024_08_23_110631_add_availability', 1), (7, '2024_08_25_141207_add_show_email_address', 1), (8, '2024_09_04_095216_add_curator_to_type_enum', 1), (9, '2024_09_10_080929_add_is_subscribed', 1), (10, '2024_09_17_111106_add_is_open', 1), (11, '2024_09_23_123138_add_is_curated', 1), (12, '2024_09_24_091734_change_event_roles', 1), (13, '2024_10_08_072109_add_online_events', 1), (14, '2024_11_06_151458_adjust_role_types', 1), (15, '2024_12_18_142217_add_solid_background', 1), (16, '2024_12_30_132215_add_tickets', 1), (17, '2025_01_05_113546_add_stripe', 1), (18, '2025_01_25_212106_add_quantity', 1), (19, '2025_02_28_130335_adjust_default_accept_requests', 1), (20, '2025_03_06_091949_add_registration_url', 1), (21, '2025_03_09_094853_add_translation_columns', 1), (22, '2025_03_09_222322_change_translation_column_types', 1), (23, '2025_04_01_000000_add_api_key_to_users', 1), (24, '2025_04_08_111332_change_schedule_to_talent', 1); -- -------------------------------------------------------- -- -- Table structure for table `password_reset_tokens` -- CREATE TABLE `password_reset_tokens` ( `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `token` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `roles` -- CREATE TABLE `roles` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `is_unlisted` tinyint(1) NOT NULL DEFAULT '0', `use_24_hour_time` tinyint(1) NOT NULL DEFAULT '0', `user_id` bigint(20) unsigned DEFAULT NULL, `subdomain` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `type` enum('venue','curator','talent') COLLATE utf8mb4_unicode_ci NOT NULL, `background` enum('gradient','solid','image') COLLATE utf8mb4_unicode_ci NOT NULL, `accent_color` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#007bff', `background_colors` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `background_rotation` int(11) NOT NULL DEFAULT '150', `font_color` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '#ffffff', `font_family` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Roboto', `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `phone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `website` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address1` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address2` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `postal_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `country_code` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `formatted_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_place_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `geo_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `geo_lat` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `geo_lon` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `timezone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `language_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en', `description` text COLLATE utf8mb4_unicode_ci, `description_html` text COLLATE utf8mb4_unicode_ci, `social_links` text COLLATE utf8mb4_unicode_ci, `payment_links` text COLLATE utf8mb4_unicode_ci, `youtube_links` text COLLATE utf8mb4_unicode_ci, `profile_image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `background_image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `show_email` tinyint(1) NOT NULL DEFAULT '0', `plan_expires` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `is_subscribed` tinyint(1) NOT NULL DEFAULT '1', `is_open` tinyint(1) NOT NULL DEFAULT '1', `accept_requests` tinyint(1) NOT NULL DEFAULT '1', `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `header_image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `background_color` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `background_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `header_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `default_tickets` text COLLATE utf8mb4_unicode_ci, `plan_term` enum('month','year') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'year', `plan_type` enum('free','pro','enterprise') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'free', `phone_verified_at` timestamp NULL DEFAULT NULL, `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_en` text COLLATE utf8mb4_unicode_ci, `description_html_en` text COLLATE utf8mb4_unicode_ci, `address1_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `address2_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `city_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `state_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `roles_subdomain_unique` (`subdomain`), KEY `roles_user_id_foreign` (`user_id`), KEY `roles_type_index` (`type`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `role_user` -- CREATE TABLE `role_user` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned NOT NULL, `role_id` bigint(20) unsigned NOT NULL, `level` enum('owner','admin','follower') COLLATE utf8mb4_unicode_ci NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `dates_unavailable` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`), UNIQUE KEY `role_user_user_id_role_id_unique` (`user_id`,`role_id`), KEY `role_user_role_id_foreign` (`role_id`), KEY `role_user_level_index` (`level`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `sales` -- CREATE TABLE `sales` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `user_id` bigint(20) unsigned DEFAULT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `secret` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `transaction_reference` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `status` enum('unpaid','paid','cancelled','refunded','expired') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'unpaid', `event_date` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `subdomain` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `payment_method` enum('cash','stripe','invoiceninja') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'cash', `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `payment_amount` decimal(13,3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`id`), KEY `sales_event_id_foreign` (`event_id`), KEY `sales_user_id_foreign` (`user_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `sale_tickets` -- CREATE TABLE `sale_tickets` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `sale_id` bigint(20) unsigned NOT NULL, `ticket_id` bigint(20) unsigned NOT NULL, `seats` text COLLATE utf8mb4_unicode_ci NOT NULL, `quantity` int(11) NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `sale_tickets_sale_id_foreign` (`sale_id`), KEY `sale_tickets_ticket_id_foreign` (`ticket_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `sessions` -- CREATE TABLE `sessions` ( `id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `user_id` bigint(20) unsigned DEFAULT NULL, `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_agent` text COLLATE utf8mb4_unicode_ci, `payload` longtext COLLATE utf8mb4_unicode_ci NOT NULL, `last_activity` int(11) NOT NULL, PRIMARY KEY (`id`), KEY `sessions_user_id_index` (`user_id`), KEY `sessions_last_activity_index` (`last_activity`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; -- -------------------------------------------------------- -- -- Table structure for table `tickets` -- CREATE TABLE `tickets` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `quantity` int(11) DEFAULT NULL, `price` decimal(13,3) DEFAULT NULL, `description` text COLLATE utf8mb4_unicode_ci, `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `sold` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `tickets_event_id_foreign` (`event_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `users` -- CREATE TABLE `users` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `email_verified_at` timestamp NULL DEFAULT NULL, `password` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `timezone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `language_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en', `profile_image_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `stripe_account_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `stripe_company_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `stripe_completed_at` timestamp NULL DEFAULT NULL, `invoiceninja_api_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `invoiceninja_api_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `invoiceninja_company_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `invoiceninja_webhook_secret` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `api_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=2 ; -- -- Dumping data for table `users` -- INSERT INTO `users` VALUES (1, '[[admin_username]]', '[[admin_email]]', '[[regtime]]', '[[admin_pass]]', 'Asia/Kolkata', 'en', NULL, '', '[[regtime]]', '[[regtime]]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- -- Constraints for dumped tables -- -- -- Constraints for table `events` -- ALTER TABLE `events` ADD CONSTRAINT `events_curator_id_foreign` FOREIGN KEY (`curator_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `events_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `events_venue_id_foreign` FOREIGN KEY (`venue_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `event_role` -- ALTER TABLE `event_role` ADD CONSTRAINT `event_role_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `event_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `roles` -- ALTER TABLE `roles` ADD CONSTRAINT `roles_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `role_user` -- ALTER TABLE `role_user` ADD CONSTRAINT `role_user_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `role_user_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `sales` -- ALTER TABLE `sales` ADD CONSTRAINT `sales_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `sales_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `sale_tickets` -- ALTER TABLE `sale_tickets` ADD CONSTRAINT `sale_tickets_sale_id_foreign` FOREIGN KEY (`sale_id`) REFERENCES `sales` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `sale_tickets_ticket_id_foreign` FOREIGN KEY (`ticket_id`) REFERENCES `tickets` (`id`) ON DELETE CASCADE; -- -- Constraints for table `tickets` -- ALTER TABLE `tickets` ADD CONSTRAINT `tickets_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE; /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;