View file File name : eventsch.sql Content : 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: `eventschedule1075` -- -- -------------------------------------------------------- -- -- Table structure for table `analytics_appearances_daily` -- CREATE TABLE `analytics_appearances_daily` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `schedule_role_id` bigint(20) unsigned NOT NULL, `date` date NOT NULL, `desktop_views` int(10) unsigned NOT NULL DEFAULT '0', `mobile_views` int(10) unsigned NOT NULL DEFAULT '0', `tablet_views` int(10) unsigned NOT NULL DEFAULT '0', `unknown_views` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `analytics_appearances_daily_role_id_schedule_role_id_date_unique` (`role_id`,`schedule_role_id`,`date`), KEY `analytics_appearances_daily_schedule_role_id_date_index` (`schedule_role_id`,`date`), KEY `analytics_appearances_daily_date_index` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `analytics_daily` -- CREATE TABLE `analytics_daily` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `date` date NOT NULL, `desktop_views` int(10) unsigned NOT NULL DEFAULT '0', `mobile_views` int(10) unsigned NOT NULL DEFAULT '0', `tablet_views` int(10) unsigned NOT NULL DEFAULT '0', `unknown_views` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `analytics_daily_role_id_date_unique` (`role_id`,`date`), KEY `analytics_daily_date_index` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `analytics_events_daily` -- CREATE TABLE `analytics_events_daily` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `date` date NOT NULL, `desktop_views` int(10) unsigned NOT NULL DEFAULT '0', `mobile_views` int(10) unsigned NOT NULL DEFAULT '0', `tablet_views` int(10) unsigned NOT NULL DEFAULT '0', `unknown_views` int(10) unsigned NOT NULL DEFAULT '0', `sales_count` int(10) unsigned NOT NULL DEFAULT '0', `revenue` decimal(13,3) NOT NULL DEFAULT '0.000', PRIMARY KEY (`id`), UNIQUE KEY `analytics_events_daily_event_id_date_unique` (`event_id`,`date`), KEY `analytics_events_daily_date_index` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `analytics_referrers_daily` -- CREATE TABLE `analytics_referrers_daily` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `date` date NOT NULL, `source` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `domain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `views` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `referrers_daily_unique` (`role_id`,`date`,`source`,`domain`), KEY `analytics_referrers_daily_role_id_date_index` (`role_id`,`date`), KEY `analytics_referrers_daily_date_index` (`date`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `audit_logs` -- CREATE TABLE `audit_logs` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `user_id` bigint(20) unsigned DEFAULT NULL, `action` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL, `model_type` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `model_id` bigint(20) unsigned DEFAULT NULL, `old_values` json DEFAULT NULL, `new_values` json DEFAULT NULL, `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci NOT NULL, `user_agent` varchar(512) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `metadata` text COLLATE utf8mb4_unicode_ci, `created_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, PRIMARY KEY (`id`), KEY `audit_logs_user_id_index` (`user_id`), KEY `audit_logs_action_index` (`action`), KEY `audit_logs_model_type_index` (`model_type`), KEY `audit_logs_created_at_index` (`created_at`), KEY `audit_logs_model_type_model_id_index` (`model_type`,`model_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `blog_posts` -- CREATE TABLE `blog_posts` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `title` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `slug` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `content` text COLLATE utf8mb4_unicode_ci NOT NULL, `excerpt` text COLLATE utf8mb4_unicode_ci, `tags` json DEFAULT NULL, `published_at` timestamp NULL DEFAULT NULL, `meta_title` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `meta_description` text COLLATE utf8mb4_unicode_ci, `featured_image` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `author_name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'Event Schedule Team', `is_published` tinyint(1) NOT NULL DEFAULT '0', `view_count` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `blog_posts_slug_unique` (`slug`), KEY `blog_posts_published_at_is_published_index` (`published_at`,`is_published`), KEY `blog_posts_slug_index` (`slug`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- 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_bak` 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, `recurring_frequency` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `recurring_interval` int(11) DEFAULT NULL, `recurring_end_type` enum('never','on_date','after_events') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'never', `recurring_end_value` 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, `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_price` decimal(13,3) DEFAULT NULL, `ticket_notes` text COLLATE utf8mb4_unicode_ci, `terms_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `total_tickets_mode` enum('individual','combined') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'individual', `payment_method` enum('cash','stripe','invoiceninja','payment_url') COLLATE utf8mb4_unicode_ci 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, `creator_role_id` bigint(20) unsigned DEFAULT NULL, `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, `short_description` text COLLATE utf8mb4_unicode_ci, `short_description_en` text COLLATE utf8mb4_unicode_ci, `description_en` text COLLATE utf8mb4_unicode_ci, `description_html_en` text COLLATE utf8mb4_unicode_ci, `category_id` int(10) unsigned DEFAULT NULL, `custom_fields` text COLLATE utf8mb4_unicode_ci, `custom_field_values` text COLLATE utf8mb4_unicode_ci, `translation_attempts` smallint(5) unsigned NOT NULL DEFAULT '0', `last_translated_at` timestamp NULL DEFAULT NULL, `last_notified_fan_content_count` int(11) DEFAULT '0', `agenda_ai_prompt` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `events_user_id_foreign` (`user_id`), KEY `events_creator_role_id_foreign` (`creator_role_id`), KEY `events_slug_index` (`slug`), KEY `events_starts_at_index` (`starts_at`), KEY `events_created_at_index` (`created_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `event_comments` -- CREATE TABLE `event_comments` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `event_part_id` bigint(20) unsigned DEFAULT NULL, `event_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint(20) unsigned NOT NULL, `comment` text COLLATE utf8mb4_unicode_ci NOT NULL, `is_approved` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `event_comments_user_id_foreign` (`user_id`), KEY `event_comments_event_id_is_approved_index` (`event_id`,`is_approved`), KEY `event_comments_event_part_id_is_approved_index` (`event_part_id`,`is_approved`), KEY `event_comments_event_id_event_date_is_approved_index` (`event_id`,`event_date`,`is_approved`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `event_parts` -- CREATE TABLE `event_parts` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description` text COLLATE utf8mb4_unicode_ci, `description_en` text COLLATE utf8mb4_unicode_ci, `description_html_en` text COLLATE utf8mb4_unicode_ci, `description_html` text COLLATE utf8mb4_unicode_ci, `start_time` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `end_time` varchar(10) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `sort_order` int(11) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, `translation_attempts` smallint(5) unsigned NOT NULL DEFAULT '0', `last_translated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `event_parts_event_id_foreign` (`event_id`) ) 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, `caldav_event_uid` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `caldav_event_etag` varchar(255) COLLATE utf8mb4_unicode_ci 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, `short_description_translated` text COLLATE utf8mb4_unicode_ci, `google_event_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `translation_attempts` smallint(5) unsigned NOT NULL DEFAULT '0', `last_translated_at` timestamp NULL DEFAULT NULL, `group_id` bigint(20) unsigned DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `event_role_role_id_event_id_unique` (`role_id`,`event_id`), KEY `event_role_caldav_event_uid_index` (`caldav_event_uid`), KEY `event_role_event_id_index` (`event_id`), KEY `event_role_google_event_id_index` (`google_event_id`), KEY `event_role_group_id_foreign` (`group_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `event_videos` -- CREATE TABLE `event_videos` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `event_id` bigint(20) unsigned NOT NULL, `event_part_id` bigint(20) unsigned DEFAULT NULL, `event_date` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_id` bigint(20) unsigned NOT NULL, `youtube_url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `is_approved` tinyint(1) NOT NULL DEFAULT '0', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `event_videos_user_id_foreign` (`user_id`), KEY `event_videos_event_id_is_approved_index` (`event_id`,`is_approved`), KEY `event_videos_event_part_id_is_approved_index` (`event_part_id`,`is_approved`), KEY `event_videos_event_id_event_date_is_approved_index` (`event_id`,`event_date`,`is_approved`) ) 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 `groups` -- CREATE TABLE `groups` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `slug` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `color` varchar(7) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `role_id` bigint(20) unsigned NOT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `groups_slug_role_id_unique` (`slug`,`role_id`), KEY `groups_role_id_foreign` (`role_id`) ) 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=98 ; -- -- 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_15_000000_add_creator_role_id_to_events', 1), (19, '2025_01_23_000001_add_caldav_fields_to_roles_table', 1), (20, '2025_01_23_000002_add_caldav_event_uid_to_event_role_table', 1), (21, '2025_01_23_000003_add_caldav_indexes', 1), (22, '2025_01_25_212106_add_quantity', 1), (23, '2025_02_28_130335_adjust_default_accept_requests', 1), (24, '2025_03_06_091949_add_registration_url', 1), (25, '2025_03_09_094853_add_translation_columns', 1), (26, '2025_03_09_222322_change_translation_column_types', 1), (27, '2025_04_01_000000_add_api_key_to_users', 1), (28, '2025_04_08_111332_change_schedule_to_talent', 1), (29, '2025_06_05_083530_add_groups', 1), (30, '2025_06_24_075408_add_payment_url_to_users_table', 1), (31, '2025_06_25_121433_add_is_subscribed_to_users_table', 1), (32, '2025_06_26_052317_create_blog_posts_table', 1), (33, '2025_07_03_073217_move_venue_to_event_role', 1), (34, '2025_07_18_074512_add_import_config_to_roles_table', 1), (35, '2025_08_01_151424_rename_is_open_to_require_approval', 1), (36, '2025_08_03_123713_add_total_tickets_mode_to_events_table', 1), (37, '2025_09_01_122943_add_custom_domain', 1), (38, '2025_09_10_100922_add_google_calendar_fields_to_events_table', 1), (39, '2025_09_20_184706_move_google_event_id_to_event_roles_table', 1), (40, '2025_12_09_111532_add_recurring_end_fields_to_events_table', 1), (41, '2026_01_12_115220_add_custom_css_to_roles_table', 1), (42, '2026_01_16_083847_fix_nis_currency_code_to_ils', 1), (43, '2026_01_20_000000_create_page_views_table', 1), (44, '2026_01_20_163241_add_terms_url_to_events_table', 1), (45, '2026_01_20_200000_add_custom_fields', 1), (46, '2026_01_20_210000_add_description_html_to_tickets', 1), (47, '2026_01_21_000000_add_is_admin_to_users_table', 1), (48, '2026_01_21_000000_create_analytics_appearances_daily_table', 1), (49, '2026_01_21_000000_normalize_country_codes', 1), (50, '2026_01_21_100000_add_google_oauth_id_to_users_table', 1), (51, '2026_01_21_110000_make_password_nullable_in_users_table', 1), (52, '2026_01_21_192148_add_subscription_fields_to_roles_table', 1), (53, '2026_01_21_192214_create_customer_columns', 1), (54, '2026_01_21_192215_create_subscriptions_table', 1), (55, '2026_01_21_192216_create_subscription_items_table', 1), (56, '2026_01_22_000000_add_graphic_settings_to_roles_table', 1), (57, '2026_01_22_000000_create_aggregated_analytics_tables', 1), (58, '2026_01_22_100000_add_conversion_tracking_to_analytics_events_daily', 1), (59, '2026_01_22_100001_create_analytics_referrers_daily_table', 1), (60, '2026_01_27_000000_add_slug_pattern_to_roles_table', 1), (61, '2026_01_27_120000_add_api_key_hash_to_users_table', 1), (62, '2026_01_27_120001_encrypt_invoiceninja_credentials', 1), (63, '2026_01_28_000000_add_event_custom_fields_to_roles_table', 1), (64, '2026_01_28_000001_add_custom_field_values_to_events_table', 1), (65, '2026_01_28_100000_add_performance_indexes', 1), (66, '2026_01_31_000000_add_utm_fields_to_users_table', 1), (67, '2026_02_01_000001_create_newsletter_tables', 1), (68, '2026_02_01_100000_add_landing_page_to_users_table', 1), (69, '2026_02_01_100001_create_event_parts_table', 1), (70, '2026_02_01_143124_add_unique_index_to_newsletter_segment_users', 1), (71, '2026_02_01_200000_add_use_24_hour_time_to_users', 1), (72, '2026_02_01_200000_change_event_layout_default_to_list', 1), (73, '2026_02_02_000001_create_event_fan_content_tables', 1), (74, '2026_02_02_000002_add_event_date_to_fan_content_tables', 1), (75, '2026_02_02_100000_add_missing_indices', 1), (76, '2026_02_03_000001_fix_invoiceninja_credential_encryption', 1), (77, '2026_02_03_114221_create_usage_daily_table', 1), (78, '2026_02_03_114222_add_translation_tracking_columns', 1), (79, '2026_02_04_000000_add_color_to_groups', 1), (80, '2026_02_04_000001_add_last_notified_fan_content_count_to_events_table', 1), (81, '2026_02_05_112434_add_agenda_visibility_to_roles_table', 1), (82, '2026_02_05_134317_add_description_html_to_event_parts_table', 1), (83, '2026_02_05_200000_fix_missing_description_html_en_column', 1), (84, '2026_02_06_000001_add_short_description_to_events_table', 1), (85, '2026_02_06_000002_add_short_description_to_event_role_table', 1), (86, '2026_02_06_122159_add_ticket_price_to_events_table', 1), (87, '2026_02_07_000001_add_direct_registration_to_roles', 1), (88, '2026_02_08_000001_add_api_key_expires_at_to_users_table', 1), (89, '2026_02_08_000002_encrypt_user_tokens', 1), (90, '2026_02_12_000001_add_first_day_of_week_to_roles_table', 1), (91, '2026_07_01_000000_move_group_id_to_event_role', 1), (92, '2026_07_01_000001_add_translation_columns_to_event_parts', 1), (93, '2026_07_01_000002_add_agenda_ai_prompt_columns', 1), (94, '2026_07_01_000003_add_recurring_frequency_to_events_table', 1), (95, '2026_07_01_000004_create_audit_logs_table', 1), (96, '2026_07_01_000005_add_two_factor_columns_to_users_table', 1), (97, '2026_07_01_000006_add_short_description_to_roles_table', 1); -- -------------------------------------------------------- -- -- Table structure for table `newsletters` -- CREATE TABLE `newsletters` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `user_id` bigint(20) unsigned NOT NULL, `subject` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `blocks` json DEFAULT NULL, `style_settings` json DEFAULT NULL, `template` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'modern', `event_ids` json DEFAULT NULL, `segment_ids` json DEFAULT NULL, `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'draft', `scheduled_at` timestamp NULL DEFAULT NULL, `sent_at` timestamp NULL DEFAULT NULL, `sent_count` int(10) unsigned NOT NULL DEFAULT '0', `open_count` int(10) unsigned NOT NULL DEFAULT '0', `click_count` int(10) unsigned NOT NULL DEFAULT '0', `ab_test_id` bigint(20) unsigned DEFAULT NULL, `ab_variant` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `send_token` varchar(64) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `newsletters_send_token_unique` (`send_token`), KEY `newsletters_user_id_foreign` (`user_id`), KEY `newsletters_ab_test_id_foreign` (`ab_test_id`), KEY `newsletters_role_id_status_index` (`role_id`,`status`), KEY `newsletters_scheduled_at_status_index` (`scheduled_at`,`status`), KEY `newsletters_sent_at_index` (`sent_at`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_ab_tests` -- CREATE TABLE `newsletter_ab_tests` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `test_field` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `sample_percentage` int(10) unsigned NOT NULL DEFAULT '20', `winner_criteria` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'open_rate', `winner_wait_hours` int(10) unsigned NOT NULL DEFAULT '4', `winner_selected_at` timestamp NULL DEFAULT NULL, `winner_variant` char(1) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending', `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `newsletter_ab_tests_role_id_foreign` (`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_clicks` -- CREATE TABLE `newsletter_clicks` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `newsletter_recipient_id` bigint(20) unsigned NOT NULL, `url` varchar(2048) COLLATE utf8mb4_unicode_ci NOT NULL, `clicked_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `ip_address` varchar(45) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `user_agent` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, PRIMARY KEY (`id`), KEY `newsletter_clicks_newsletter_recipient_id_index` (`newsletter_recipient_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_recipients` -- CREATE TABLE `newsletter_recipients` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `newsletter_id` bigint(20) unsigned NOT NULL, `user_id` bigint(20) unsigned DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `token` varchar(64) COLLATE utf8mb4_unicode_ci NOT NULL, `status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'pending', `sent_at` timestamp NULL DEFAULT NULL, `error_message` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `opened_at` timestamp NULL DEFAULT NULL, `open_count` int(10) unsigned NOT NULL DEFAULT '0', `clicked_at` timestamp NULL DEFAULT NULL, `click_count` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `newsletter_recipients_token_unique` (`token`), KEY `newsletter_recipients_user_id_foreign` (`user_id`), KEY `newsletter_recipients_newsletter_id_status_index` (`newsletter_id`,`status`), KEY `newsletter_recipients_token_index` (`token`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_segments` -- CREATE TABLE `newsletter_segments` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `type` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `filter_criteria` json DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), KEY `newsletter_segments_role_id_index` (`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_segment_users` -- CREATE TABLE `newsletter_segment_users` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `newsletter_segment_id` bigint(20) unsigned NOT NULL, `user_id` bigint(20) unsigned DEFAULT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `newsletter_segment_users_newsletter_segment_id_email_unique` (`newsletter_segment_id`,`email`), KEY `newsletter_segment_users_user_id_foreign` (`user_id`), KEY `newsletter_segment_users_newsletter_segment_id_index` (`newsletter_segment_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `newsletter_unsubscribes` -- CREATE TABLE `newsletter_unsubscribes` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `email` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `unsubscribed_at` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, PRIMARY KEY (`id`), UNIQUE KEY `newsletter_unsubscribes_role_id_email_unique` (`role_id`,`email`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `parsed_event_urls` -- CREATE TABLE `parsed_event_urls` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `url` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, PRIMARY KEY (`id`), UNIQUE KEY `parsed_event_urls_url_unique` (`url`), KEY `parsed_event_urls_role_id_foreign` (`role_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=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', `require_approval` tinyint(1) NOT NULL DEFAULT '1', `accept_requests` tinyint(1) NOT NULL DEFAULT '1', `direct_registration` tinyint(1) NOT NULL DEFAULT '0', `first_day_of_week` tinyint(4) NOT NULL DEFAULT '0', `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', `caldav_settings` text COLLATE utf8mb4_unicode_ci, `caldav_sync_direction` enum('to','from','both') COLLATE utf8mb4_unicode_ci DEFAULT NULL, `caldav_sync_token` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `caldav_last_sync_at` timestamp NULL DEFAULT NULL, `phone_verified_at` timestamp NULL DEFAULT NULL, `name_en` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `description_en` text COLLATE utf8mb4_unicode_ci, `short_description` text COLLATE utf8mb4_unicode_ci, `short_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, `import_config` text COLLATE utf8mb4_unicode_ci, `email_settings` text COLLATE utf8mb4_unicode_ci, `custom_domain` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `event_layout` enum('calendar','list','grid') COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'list', `google_calendar_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_webhook_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_webhook_resource_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_webhook_expires_at` timestamp NULL DEFAULT NULL, `sync_direction` enum('to','from','both') COLLATE utf8mb4_unicode_ci DEFAULT NULL, `request_terms` text COLLATE utf8mb4_unicode_ci, `request_terms_en` text COLLATE utf8mb4_unicode_ci, `last_notified_request_count` int(11) DEFAULT '0', `custom_css` text COLLATE utf8mb4_unicode_ci, `event_custom_fields` text COLLATE utf8mb4_unicode_ci, `custom_fields` text COLLATE utf8mb4_unicode_ci, `stripe_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pm_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pm_last_four` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `trial_ends_at` timestamp NULL DEFAULT NULL, `graphic_settings` text COLLATE utf8mb4_unicode_ci, `slug_pattern` varchar(500) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `translation_attempts` smallint(5) unsigned NOT NULL DEFAULT '0', `last_translated_at` timestamp NULL DEFAULT NULL, `agenda_show_times` tinyint(1) DEFAULT NULL, `agenda_show_description` tinyint(1) DEFAULT NULL, `agenda_ai_prompt` varchar(500) 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`), KEY `roles_caldav_sync_direction_index` (`caldav_sync_direction`), KEY `roles_stripe_id_index` (`stripe_id`) ) 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','payment_url') COLLATE utf8mb4_unicode_ci DEFAULT 'cash', `is_deleted` tinyint(1) NOT NULL DEFAULT '0', `payment_amount` decimal(13,3) NOT NULL DEFAULT '0.000', `custom_value1` text COLLATE utf8mb4_unicode_ci, `custom_value2` text COLLATE utf8mb4_unicode_ci, `custom_value3` text COLLATE utf8mb4_unicode_ci, `custom_value4` text COLLATE utf8mb4_unicode_ci, `custom_value5` text COLLATE utf8mb4_unicode_ci, `custom_value6` text COLLATE utf8mb4_unicode_ci, `custom_value7` text COLLATE utf8mb4_unicode_ci, `custom_value8` text COLLATE utf8mb4_unicode_ci, PRIMARY KEY (`id`), KEY `sales_user_id_foreign` (`user_id`), KEY `sales_event_id_secret_index` (`event_id`,`secret`), KEY `sales_status_index` (`status`), KEY `sales_payment_method_transaction_reference_index` (`payment_method`,`transaction_reference`), KEY `sales_event_date_index` (`event_date`) ) 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', `custom_value1` text COLLATE utf8mb4_unicode_ci, `custom_value2` text COLLATE utf8mb4_unicode_ci, `custom_value3` text COLLATE utf8mb4_unicode_ci, `custom_value4` text COLLATE utf8mb4_unicode_ci, `custom_value5` text COLLATE utf8mb4_unicode_ci, `custom_value6` text COLLATE utf8mb4_unicode_ci, `custom_value7` text COLLATE utf8mb4_unicode_ci, `custom_value8` text COLLATE utf8mb4_unicode_ci, 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 `subscriptions` -- CREATE TABLE `subscriptions` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `role_id` bigint(20) unsigned NOT NULL, `type` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `stripe_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `stripe_status` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `stripe_price` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `quantity` int(11) DEFAULT NULL, `trial_ends_at` timestamp NULL DEFAULT NULL, `ends_at` timestamp NULL DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `subscriptions_stripe_id_unique` (`stripe_id`), KEY `subscriptions_role_id_stripe_status_index` (`role_id`,`stripe_status`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- Table structure for table `subscription_items` -- CREATE TABLE `subscription_items` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `subscription_id` bigint(20) unsigned NOT NULL, `stripe_id` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `stripe_product` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `stripe_price` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL, `quantity` int(11) DEFAULT NULL, `created_at` timestamp NULL DEFAULT NULL, `updated_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `subscription_items_stripe_id_unique` (`stripe_id`), KEY `subscription_items_subscription_id_stripe_price_index` (`subscription_id`,`stripe_price`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci AUTO_INCREMENT=1 ; -- -------------------------------------------------------- -- -- 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, `description_html` 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, `custom_fields` 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 `usage_daily` -- CREATE TABLE `usage_daily` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `date` date NOT NULL, `operation` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL, `role_id` bigint(20) unsigned NOT NULL DEFAULT '0', `count` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), UNIQUE KEY `usage_daily_date_operation_role_id_unique` (`date`,`operation`,`role_id`), KEY `usage_daily_date_index` (`date`), KEY `usage_daily_role_id_index` (`role_id`), KEY `usage_daily_operation_index` (`operation`) ) 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 DEFAULT NULL, `two_factor_secret` text COLLATE utf8mb4_unicode_ci, `two_factor_recovery_codes` text COLLATE utf8mb4_unicode_ci, `two_factor_confirmed_at` timestamp NULL DEFAULT NULL, `timezone` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `language_code` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'en', `use_24_hour_time` tinyint(1) DEFAULT NULL, `utm_source` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `utm_medium` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `utm_campaign` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `utm_content` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `utm_term` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `referrer_url` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `landing_page` varchar(2048) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `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` text COLLATE utf8mb4_unicode_ci, `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` text COLLATE utf8mb4_unicode_ci, `api_key` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `api_key_hash` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `api_key_expires_at` timestamp NULL DEFAULT NULL, `payment_url` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `payment_secret` text COLLATE utf8mb4_unicode_ci, `is_subscribed` tinyint(1) NOT NULL DEFAULT '1', `is_admin` tinyint(1) NOT NULL DEFAULT '0', `google_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_oauth_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `google_token` text COLLATE utf8mb4_unicode_ci, `google_refresh_token` text COLLATE utf8mb4_unicode_ci, `google_token_expires_at` timestamp NULL DEFAULT NULL, `facebook_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `facebook_token` text COLLATE utf8mb4_unicode_ci, `facebook_token_expires_at` timestamp NULL DEFAULT NULL, `stripe_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pm_type` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `pm_last_four` varchar(4) COLLATE utf8mb4_unicode_ci DEFAULT NULL, `trial_ends_at` timestamp NULL DEFAULT NULL, PRIMARY KEY (`id`), UNIQUE KEY `users_email_unique` (`email`), KEY `users_google_oauth_id_index` (`google_oauth_id`), KEY `users_stripe_id_index` (`stripe_id`), KEY `users_utm_source_index` (`utm_source`), KEY `users_utm_campaign_index` (`utm_campaign`) ) 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]]', NULL, NULL, NULL, 'Asia/Kolkata', 'en', 1, NULL, NULL, NULL, NULL, NULL, NULL, '[[relativeurl_]]', NULL, '', '[[regtime]]', '[[regtime]]', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL); -- -- Constraints for dumped tables -- -- -- Constraints for table `analytics_appearances_daily` -- ALTER TABLE `analytics_appearances_daily` ADD CONSTRAINT `analytics_appearances_daily_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `analytics_appearances_daily_schedule_role_id_foreign` FOREIGN KEY (`schedule_role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `analytics_daily` -- ALTER TABLE `analytics_daily` ADD CONSTRAINT `analytics_daily_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `analytics_events_daily` -- ALTER TABLE `analytics_events_daily` ADD CONSTRAINT `analytics_events_daily_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE; -- -- Constraints for table `analytics_referrers_daily` -- ALTER TABLE `analytics_referrers_daily` ADD CONSTRAINT `analytics_referrers_daily_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `audit_logs` -- ALTER TABLE `audit_logs` ADD CONSTRAINT `audit_logs_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL; -- -- Constraints for table `events` -- ALTER TABLE `events` ADD CONSTRAINT `events_creator_role_id_foreign` FOREIGN KEY (`creator_role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `events_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `event_comments` -- ALTER TABLE `event_comments` ADD CONSTRAINT `event_comments_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `event_comments_event_part_id_foreign` FOREIGN KEY (`event_part_id`) REFERENCES `event_parts` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `event_comments_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `event_parts` -- ALTER TABLE `event_parts` ADD CONSTRAINT `event_parts_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`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_group_id_foreign` FOREIGN KEY (`group_id`) REFERENCES `groups` (`id`) ON DELETE SET NULL, ADD CONSTRAINT `event_role_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `event_videos` -- ALTER TABLE `event_videos` ADD CONSTRAINT `event_videos_event_id_foreign` FOREIGN KEY (`event_id`) REFERENCES `events` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `event_videos_event_part_id_foreign` FOREIGN KEY (`event_part_id`) REFERENCES `event_parts` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `event_videos_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `groups` -- ALTER TABLE `groups` ADD CONSTRAINT `groups_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `newsletters` -- ALTER TABLE `newsletters` ADD CONSTRAINT `newsletters_ab_test_id_foreign` FOREIGN KEY (`ab_test_id`) REFERENCES `newsletter_ab_tests` (`id`) ON DELETE SET NULL, ADD CONSTRAINT `newsletters_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `newsletters_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE; -- -- Constraints for table `newsletter_ab_tests` -- ALTER TABLE `newsletter_ab_tests` ADD CONSTRAINT `newsletter_ab_tests_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `newsletter_clicks` -- ALTER TABLE `newsletter_clicks` ADD CONSTRAINT `newsletter_clicks_newsletter_recipient_id_foreign` FOREIGN KEY (`newsletter_recipient_id`) REFERENCES `newsletter_recipients` (`id`) ON DELETE CASCADE; -- -- Constraints for table `newsletter_recipients` -- ALTER TABLE `newsletter_recipients` ADD CONSTRAINT `newsletter_recipients_newsletter_id_foreign` FOREIGN KEY (`newsletter_id`) REFERENCES `newsletters` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `newsletter_recipients_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL; -- -- Constraints for table `newsletter_segments` -- ALTER TABLE `newsletter_segments` ADD CONSTRAINT `newsletter_segments_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `newsletter_segment_users` -- ALTER TABLE `newsletter_segment_users` ADD CONSTRAINT `newsletter_segment_users_newsletter_segment_id_foreign` FOREIGN KEY (`newsletter_segment_id`) REFERENCES `newsletter_segments` (`id`) ON DELETE CASCADE, ADD CONSTRAINT `newsletter_segment_users_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE SET NULL; -- -- Constraints for table `newsletter_unsubscribes` -- ALTER TABLE `newsletter_unsubscribes` ADD CONSTRAINT `newsletter_unsubscribes_role_id_foreign` FOREIGN KEY (`role_id`) REFERENCES `roles` (`id`) ON DELETE CASCADE; -- -- Constraints for table `parsed_event_urls` -- ALTER TABLE `parsed_event_urls` ADD CONSTRAINT `parsed_event_urls_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 */;