dutymess / laravel-0-to-60 Goto Github PK
View Code? Open in Web Editor NEWA Detailed Step-by-Step Introduction to the Laravel World
Home Page: https://dutymess.github.io/laravel-0-to-60/
License: Other
A Detailed Step-by-Step Introduction to the Laravel World
Home Page: https://dutymess.github.io/laravel-0-to-60/
License: Other
Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes") C:\wamp\www\Apollo\vendor\laravel\framework\src\Illuminate\Database\Connection.php:458
که باعث میشد جدول ها در دیتابیس ایجاد نشوند.
در نهایت با بررسی که کردم متوجه شدم مشکل در این قسمت از فایل مایگریشن users است:
$table->index(['last_name' , 'first_name'] , 'users_name_index');
چون طول کاراکترهای firstname و lastname تعیین نشده طول کاراکترهاشون خیلی طولانی میشد و ارور میداد با تغییر این قسمت تونستم این ارور رو برطرف کنم که اول عدد 255 رو دادم حل نشد ولی در نهایت با تعیین 45 کاراکتر برای هر کدام از ستون ها مشکل رفع شد:
$table->string('first_name',45)->after('id');
$table->string('last_name',45)->after('first_name');
بنده باین روش حل کردم به نظرم صلاح دونستم که باهاتون مطرح کنم تا اگه نیازه تو کتابتون اصلاح کنید یا اگر روش بهتری پیشنهاد میدید خوشحال میشم ارائه بدید.
در ضمن ورژن لاراول که کار میکنم 5.6 هست و ورژن پی اچ پی
7.1
باتشکر
اگر اپلیکیشن ما کاربر دیگری هم داشته باشد و در حین درج رکوردها توسط ما، رکوردهایی در همان جدول درج کند در اینصورت هنگام حذف رکوردها، رکوردهای کاربر دوم هم حذف میشود
اصلا چنین اتفاقی امکان دارد و راه حلش چیست؟
بیش از دو ساله هنوز کتاب اپدیت نشده چرا اخه؟
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.