create table `users` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(255) not null, `email` varchar(255) not null, `email_verified_at` timestamp null, `password` varchar(255) not null, `remember_token` varchar(100) null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `users` add unique `users_email_unique`(`email`)
create table `password_resets` (`email` varchar(255) not null, `token` varchar(255) not null, `created_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `password_resets` add index `password_resets_email_index`(`email`)
create table `failed_jobs` (`id` bigint unsigned not null auto_increment primary key, `uuid` varchar(255) not null, `connection` text not null, `queue` text not null, `payload` longtext not null, `exception` longtext not null, `failed_at` timestamp default CURRENT_TIMESTAMP not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `failed_jobs` add unique `failed_jobs_uuid_unique`(`uuid`)
create table `personal_access_tokens` (`id` bigint unsigned not null auto_increment primary key, `tokenable_type` varchar(255) not null, `tokenable_id` bigint unsigned not null, `name` varchar(255) not null, `token` varchar(64) not null, `abilities` text null, `last_used_at` timestamp null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `personal_access_tokens` add index `personal_access_tokens_tokenable_type_tokenable_id_index`(`tokenable_type`, `tokenable_id`)
alter table `personal_access_tokens` add unique `personal_access_tokens_token_unique`(`token`)
create table `files` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(256) not null, `path` varchar(1024) null, `stored_at` varchar(2000) null, `s3` tinyint(1) not null default '0', `_lft` int unsigned not null default '0', `_rgt` int unsigned not null default '0', `parent_id` int unsigned null, `is_folder` tinyint(1) not null, `mimetype` varchar(255) null, `size` int null, `created_at` timestamp null, `updated_at` timestamp null, `created_by` bigint unsigned not null, `updated_by` bigint unsigned not null, `deleted_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `files` add index `files__lft__rgt_parent_id_index`(`_lft`, `_rgt`, `parent_id`)
create table `file_shares` (`id` bigint unsigned not null auto_increment primary key, `file_id` bigint unsigned not null, `user_id` bigint unsigned not null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `file_shares` add constraint `file_shares_file_id_foreign` foreign key (`file_id`) references `files` (`id`)
alter table `file_shares` add constraint `file_shares_user_id_foreign` foreign key (`user_id`) references `users` (`id`)
create table `jobs` (`id` bigint unsigned not null auto_increment primary key, `queue` varchar(255) not null, `payload` longtext not null, `attempts` tinyint unsigned not null, `reserved_at` int unsigned null, `available_at` int unsigned not null, `created_at` int unsigned not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci'
alter table `jobs` add index `jobs_queue_index`(`queue`)
