Ahoj, Nevim cim to, ale kdyz dam prikaz artisan migrate tak mi to vyhodi chyby a nevytvori vsechny tabulky a to chci jen vytvorit ty co uz jsou prednastaveny od laravelu (user, failed_jobs...) Microsoft Windows [Verze 6.1.7601] Copyright (c) 2009 Microsoft Corporation. Všechna práva vyhrazena.
w:\008>php artisan migrate
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Illuminate\Database\QueryException
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`))
at W:\008\vendor\laravel\framework\src\Illuminate\Database\Connection.php:671
667▕ // If an exception occurs when attempting to run a query, we'll format the error
668▕ // message to include the bindings with SQL, which will make this exception a
669▕ // lot more helpful to the developer instead of just the database's errors.
670▕ catch (Exception $e) {
➜ 671▕ throw new QueryException(
672▕ $query, $this->prepareBindings($bindings), $e
673▕ );
674▕ }
675▕
}
675▕
1 W:\008\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464
PDOException::("SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 767 bytes")
2 W:\008\vendor\laravel\framework\src\Illuminate\Database\Connection.php:464
PDOStatement::execute()
Nekde sem udelal chybu nechapu
To možeš ľahko zmeniť. Registrácia je zdarma a ako registrovaný člen získaš množstvo výhod. Prečítaj si prečo by si mal byť členom.
Prihlásiť sa ZaregistrovaťHello,everyone https://wanelo.co/washclub18 https://historyhub.history.gov/external-link.jspa?url=https://pbase.com/topics/saltsheep79/h1human_hair_lace_wigs_la https://darcvigilante.site/member.php?action=profile&uid=268653 https://sportbookmark.stream/story.php?title=fast-shipping-wigs-in-inventory-wigs-transport-within-24-wigs-collection#discuss http://q2a.sydt.com.tw/index.php?qa=user&qa_1=pastoryew1
[url=https://www.chronocompendium.com/Forums/index.php?topic=13673.new#new]Hello, everyone[/url] [url=https://epitalon.pl/forum/viewtopic.php?f=3&t=67499]Hello, everyone[/url] [url=https://www.columnx.nl/cx-cafe/topic/hello-everyone-5/#postid-2828]Hello, everyone[/url] [url=https://parafarrf.ru/forum/?PAGE_NAME=message&FID=2&TID=12&TITLE_SEO=12-shtatnaya-magnitola-parafar-dlya-toyota-camry-v30-do-2006-na-android-8.1.0-_pf061xhd&MID=59551&result=reply#message59551]Hello, everyone[/url] [url=http://shiqi98.com/bbs/forum.php?mod=viewthread&tid=498&pid=22338&page=78&extra=#pid22338]Hello, everyone[/url] 63e53c3
It's my first time come here [url=https://www.proggnosis.com/Forum/topic5616-hello-everyone.aspx?MessageID=6041]Hello, everyone[/url] [url=https://avigames.at.ua/forum/5-44-7#91245]Hello, everyone[/url] [url=https://nocens.boards.net/thread/1/welcome-new-forum?page=2#scrollTo=21]Hello, everyone[/url] [url=http://cosw.phorum.pl/viewtopic.php?f=1&t=174284]Hello, everyone[/url] [url=http://www.pp2263.com/forum.php?mod=viewthread&tid=207&pid=15372&page=1&extra=#pid15372]Hello, everyone[/url] 197c63c
Je to tym, ze Laravel defaultne pouziva kodovanie utf8mb4
a v MySQL v. < 5.7.7 a MariaDB < 10.2.2 sa tam tieto kluce nezmestia.
Jednoduchy fix je zavolat v boot
metode v AppServiceProvider
toto:
Schema::defaultStringLength(191);
cim sa zabezpeci nastavenie pozadovanej dlzky indexov.
Viac info tu: https://laravel.com/docs/7.x/migrations#creating-indexes (Index Lengths & MySQL / MariaDB)