examinee
examinee copied to clipboard
Migrations fail (php artisan migrate:fresh --seed)
Default install, the migration step of the README fails as described below.
OS: Debian 9.12 DB: 10.1.44-MariaDB-0+deb9u1 Debian 9.11 PHP: 7.4
john@srv:/var/www/html/examinee$ php artisan migrate:fresh --seed
Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated: 2014_10_12_000000_create_users_table (0.72 seconds)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated: 2014_10_12_100000_create_password_resets_table (0.6 seconds)
Migrating: 2018_01_20_170812_create_settings_table
Migrated: 2018_01_20_170812_create_settings_table (0.67 seconds)
Migrating: 2018_01_20_170835_create_topics_table
Migrated: 2018_01_20_170835_create_topics_table (0.32 seconds)
Migrating: 2019_05_09_054845_create_files_table
Illuminate\Database\QueryException
SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'json null, `permissions` json null, `created_at` timestamp null, `updated_at` ti' at line 1 (SQL: create table `files` (`id` bigint unsigned not null auto_increment primary key, `name` varchar(191) not null, `description` varchar(150) null, `path` varchar(191) null, `type` varchar(20) null, `public_path` varchar(255) null, `extension` varchar(10) null, `mime` varchar(50) null, `file_size` bigint unsigned null, `file_name` varchar(255) not null, `parent_id` int null, `driver` varchar(191) null, `driver_data` varchar(191) null, `isdraft` tinyint(1) not null default '1', `uploaded_by` int null, `deleted_by` int null, `meta` json null, `permissions` json null, `created_at` timestamp null, `updated_at` timestamp null, `deleted_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
at vendor/laravel/framework/src/Illuminate/Database/Connection.php:671
667| // If an exception occurs when attempting to run a query, we'll format the error
668| // message to include the bindings with SQL, which will make this exception a
669| // lot more helpful to the developer instead of just the database's errors.
670| catch (Exception $e) {
> 671| throw new QueryException(
672| $query, $this->prepareBindings($bindings), $e
673| );
674| }
675|
+11 vendor frames
12 database/migrations/2019_05_09_054845_create_files_table.php:41
Illuminate\Support\Facades\Facade::__callStatic()
+34 vendor frames
47 artisan:37
Illuminate\Foundation\Console\Kernel::handle()```
I am also facing the same issue. 😥