I bought laraship after verifying that my server complied with the minimum requirements, but after buying it and when installing it, I find that it needs MySQL 5.7 or higher, which supports the JSON column type.
When I install the Payments Gateway plugin, I receive the following error
[2018-11-10 20:53:11] local.ERROR: installing module failed: 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, reference
varchar(191) null, created_by
int unsigned null, updat' at line 1 (SQL: create table
payment_transactions(
idint unsigned not null auto_increment primary key,
owner_idint unsigned not null,
owner_typevarchar(191) not null,
invoice_idint unsigned null,
sourcable_idint unsigned not null,
sourcable_typevarchar(191) not null,
amountdouble(8, 2) not null default '0',
paid_currencyvarchar(191) null,
paid_amountdouble(8, 2) null,
typevarchar(191) null,
methodvarchar(191) null,
transaction_datetimestamp null,
statusenum('completed', 'pending', 'cancelled') not null default 'completed',
notestext null,
extrajson null,
referencevarchar(191) null,
created_byint unsigned null,
updated_byint unsigned null,
deleted_attimestamp null,
created_attimestamp null,
updated_attimestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci) {"userId":1,"email":"superuser@corals.io","exception":"[object] (Exception(code: 0): installing module failed: 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,
referencevarchar(191) null,
created_byint unsigned null,
updat' at line 1 (SQL: create table payment_transactions
(id
int unsigned not null auto_increment primary key, owner_id
int unsigned not null, owner_type
varchar(191) not null, invoice_id
int unsigned null, sourcable_id
int unsigned not null, sourcable_type
varchar(191) not null, amount
double(8, 2) not null default '0', paid_currency
varchar(191) null, paid_amount
double(8, 2) null, type
varchar(191) null, method
varchar(191) null, transaction_date
timestamp null, status
enum('completed', 'pending', 'cancelled') not null default 'completed', notes
text null, extra
json null, reference
varchar(191) null, created_by
int unsigned null, updated_by
int unsigned null, deleted_at
timestamp null, created_at
timestamp null, updated_at
timestamp null) default character set utf8mb4 collate utf8mb4_unicode_ci) at /Applications/MAMP/htdocs/laraship/Corals/core/Settings/Classes/Modules.php:461)
1 Answers
Hello,
The issue has been fixed and you can install the fixed package or you can edit the file Corals/modules/Payment/Common/database/migrations/2018_04_15_000000_create_transactions_table.php
change #37
$table->json('extra')->nullable();
to
$table->text('extra')->nullable();
Is Resolved!
Many Thanks
Please login or Register to submit your answer