0

I was trying to deploy my project built using Laravel but when I came to apply the command

heroku run php artisan migrate:refresh

I got an error

In Connection.php line 742:
                                                                                                                                       
  SQLSTATE[42000]: Syntax error or access violation: 1064 You have an error in your SQL syntax; check the manual that corresponds to   
   your MySQL server version for the right syntax to use near 'json null, `uuid` char(36) not null, `created_at` timestamp null, `up   
  dated_at` t' at line 1 (SQL: create table `transactions` (`id` bigint unsigned not null auto_increment primary key, `payable_type`   
   varchar(191) not null, `payable_id` bigint unsigned not null, `wallet_id` bigint unsigned not null, `type` enum('deposit', 'withd   
  raw') not null, `amount` decimal(64, 0) not null, `confirmed` tinyint(1) not null, `meta` json null, `uuid` char(36) not null, `cr   
  eated_at` timestamp null, `updated_at` timestamp null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')  

I don't really know how to solve that. appreciate your help .

  • What version of MySQL are you using? It sounds like it may not support json columns, which was added in 5.7.8 – aynber Jun 29 '22 at 14:16
  • This is a database error. Contact the person responsible for database operation and discuss the issue. – hakre Jun 29 '22 at 14:20
  • when I apply $ mysql -V got -> F:\xampp\mysql\bin\mysql.exe Ver 15.1 Distrib 10.4.22-MariaDB, for Win64 (AMD64) – Fatima Almashhor Jun 29 '22 at 14:22
  • That may not be the version that heroku is running – aynber Jun 29 '22 at 14:23
  • @aynber how can I know the Heroku version ? – Fatima Almashhor Jun 29 '22 at 14:23
  • 1
    Who is managing the databases on heroku for that project? You really should ask someone who is or takes responsibility there as the topic looks to be only a guessing game for you. Look for help with people who are able to help (stakeholders in your project). – hakre Jun 29 '22 at 14:24
  • It is my personal project so I want to deploy it . – Fatima Almashhor Jun 29 '22 at 14:26
  • Please compare with the Q&A material closed against. Additional use Heroku support resources and those of Laravel to match your system requirements, e.g. that the database is of type and version your project requires, Laravel supports and the Hosting Service Provider offers on a system to rent. – hakre Jun 29 '22 at 14:28
  • my problem is that I am using laravel-wallet which has it is own migration I do not know how to change the json to text of the package's files . – Fatima Almashhor Jun 29 '22 at 14:40

0 Answers0