Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

can not run php artisan shaark:install on fresh git clone #68

Closed
ScrumpyJack opened this issue Mar 1, 2020 · 3 comments
Closed

can not run php artisan shaark:install on fresh git clone #68

ScrumpyJack opened this issue Mar 1, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@ScrumpyJack
Copy link

hi there. Would like to try out Shaark but the installation fails

Steps taken:

git clone https://github.com/MarceauKa/shaark
cd shaark/
export APP_ENV=local
composer install
cp .env.example .env
vim .env
php artisan key:generate
php artisan storage:link
php artisan shaark:install

error:

SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes (SQL: alter table users add unique users_email_unique(email))

@ScrumpyJack
Copy link
Author

ScrumpyJack commented Mar 1, 2020

Attempting any one of these fixes gets me further
https://stackoverflow.com/questions/42244541/laravel-migration-error-syntax-error-or-access-violation-1071-specified-key-wa

but i new get a sql statement error

   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 not null, `custom_properties` json not null, `responsive_images` json not n' at line 1 (SQL: create table `media` (`id` bigint unsigned not null auto_increment primary key, `model_type` varchar(191) not null, `model_id` bigint unsigned not null, `collection_name` varchar(191) not null, `name` varchar(191) not null, `file_name` varchar(191) not null, `mime_type` varchar(191) null, `disk` varchar(191) not null, `size` bigint unsigned not null, `manipulations` json not null, `custom_properties` json not null, `responsive_images` json not null, `order_column` int unsigned null, `created_at` timestamp null, `updated_at` timestamp null) default character set utf8 collate 'utf8_unicode_ci' engine = InnoDB)

mysql Ver 15.1 Distrib 10.1.44-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2

@MarceauKa
Copy link
Owner

MarceauKa commented Mar 1, 2020

Hi, thank you for your feedback. It's a well-know error. You should update to MySQL 5.7 or Maria 10.2. It seems you're using Maria 10.1.

You can try SQLite too, but it's not fully supported yet. In your .env set DB_CONNECTION to sqlite and remove all others DB_* vars. Then, create a SQLite file touch database/database.sqlite.
Update database/migrations/2020_01_03_170000_update_logins_and_devices_table_user_relation.php and replace $table->string('user_type')->after('user_id'); (lines 12 and 16) with $table->string('user_type')->nullable()->after('user_id');.

@MarceauKa MarceauKa added the enhancement New feature or request label Mar 1, 2020
@MarceauKa
Copy link
Owner

Fix for SQLite released in 1.2.40 if you want to give a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants