在laravel8中运行迁移命令时出错

我正在使用Laravel Cashier包。

我在下面添加了 AppServiceProvider.php > boot method

 Cashier::ignoreMigrations();

我创建了自己的迁移,即:create_subscriptions_table 和 create_subscription_items_table

当我运行php artisan migrate命令时,出现以下错误:

   Migrating: 2019_05_03_000002_create_subscriptions_table

   IlluminateDatabaseQueryException 

  SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'subscriptions' already exists (SQL: create table `subscriptions` (`id` bigint unsigned not null auto_increment primary key, `user_id` bigint unsigned not null, `name` varchar(191) not null, `stripe_id` varchar(191) not null, `stripe_status` varchar(191) not null, `stripe_plan` varchar(191) null, `quantity` int null, `trial_ends_at` timestamp null, `ends_at` timestamp null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci') 

我收到此错误,因为迁移2019_05_03_000002_create_subscriptions_table位于供应商文件夹中。

我想运行我自己的迁移而不是从供应商那里迁移,所以有什么解决方案可以解决这个问题吗?

以上是在laravel8中运行迁移命令时出错的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>