#Migration problem after update

2 messages · Page 1 of 1 (latest)

agile frost
#
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 'after `last_used_at`, `last_used_at` timestamp null, `created_at` timestamp n...' at line 1 (Connection: mysql, SQL: create table `personal_access_tokens` (`id` bigint unsigned not null auto_increment primary key, `tokenable_type` varchar(191) not null, `tokenable_id` bigint unsigned not null, `name` varchar(191) not null, `token` varchar(64) not null, `abilities` text null, `expires_at` timestamp null after `last_used_at`, `last_used_at` timestamp null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')

the database is in utf8mb4unicode
tried setting the

use Illuminate\Support\Facades\Schema;

public function boot()
{
    Schema::defaultStringLength(191);
}

tried dropping all tables, composer dumpautoload, has anyone experience this recently?

elder chasm
#

You can only "after" with columns that already exist. When creating the table, the columns will be in the same order as they're added in the migration.